Skip to content

Commit

Permalink
Add SECURITY.md
Browse files Browse the repository at this point in the history
Add SECURITY.md also fix unexpected behavior with tags in number. See danpros#614
  • Loading branch information
danpros committed Dec 14, 2023
1 parent 4b9d74f commit 5a4357b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ New category info etc.
````
The slug for the new category is `new-category` (htmly removing the file extension). And for full file directory:
````
content/username/new-category/post/file.md
content/username/blog/new-category/post/file.md
````

File Naming Convention
Expand Down
5 changes: 5 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Security Policy

### Reporting Vulnerability

Please report any security vulnerabilities to **[[email protected]](mailto:[email protected])**. If we can confirm the issue, we will release a patch as soon as possible.
12 changes: 6 additions & 6 deletions system/admin/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function add_content($title, $tag, $url, $content, $user, $draft, $category, $ty
foreach ($tag as $t) {
if (array_key_exists($t, $tflip)) {
foreach ($tflip as $tfp => $tf){
if($t === $tfp) {
if($t == $tfp) {
$post_tag[] = $tf;
$post_tagmd[] = $tfp;
}
Expand Down Expand Up @@ -136,8 +136,8 @@ function add_content($title, $tag, $url, $content, $user, $draft, $category, $ty
foreach ($combine as $tag => $v) {
if (array_key_exists($v, $tags)) {
foreach ($inter as $in => $i){
if($v === $in) {
if (strtolower($tag) === strtolower(tag_i18n($in))) {
if($v == $in) {
if (strtolower($tag) == strtolower(tag_i18n($in))) {
$newtag[$v]= $tag;
} else {
$newtag[$v.'-'. $timestamp]= $tag;
Expand Down Expand Up @@ -242,7 +242,7 @@ function edit_content($title, $tag, $url, $content, $oldfile, $revertPost, $publ
foreach ($tag as $t) {
if (array_key_exists($t, $tflip)) {
foreach ($tflip as $tfp => $tf){
if($t === $tfp) {
if($t == $tfp) {
$post_tag[] = $tf;
$post_tagmd[] = $tfp;
}
Expand Down Expand Up @@ -287,8 +287,8 @@ function edit_content($title, $tag, $url, $content, $oldfile, $revertPost, $publ
foreach ($combine as $tag => $v) {
if (array_key_exists($v, $tags)) {
foreach ($inter as $in => $i){
if($v === $in) {
if (strtolower($tag) === strtolower(tag_i18n($in))) {
if($v == $in) {
if (strtolower($tag) == strtolower(tag_i18n($in))) {
$newtag[$v]= $tag;
} else {
$newtag[$v.'-'. $timestamp]= $tag;
Expand Down
2 changes: 1 addition & 1 deletion system/includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -3369,4 +3369,4 @@ function publish_scheduled()
}
}
}
}
}

0 comments on commit 5a4357b

Please sign in to comment.