Some problems when specifying keywords #282

Open
opened 2023-09-09 13:39:12 +00:00 by fg_toshiyuki · 1 comment

Several issues were identified when I specified "Manage mode >> keywords".

1. Failure when "Regular expression" option is enabled

If I specify the "Regular expression" option in "Manage mode >> keywords", when I post, the post succeeds, but keyword confirmation fails.
Since the following error is displayed, it is thought that the delimiter has not been specified in "preg_match ".

regexp:k.{0,5}o.{0,5}u.{0,5}shirou : Hide until approved

When posts:

Warning: preg_match(): Delimiter must not be alphanumeric or backslash in /var/www/html/imgboard/inc/functions.php on line 365

I tentatively modified it as follows.
functions.php : function checkKeywords($text)
if (preg_match(substr($keyword['text'], 7), $text)) {

to...
if (preg_match('/' . substr($keyword['text'],7) . '/' . TINYIB_WORDBREAK_MULTIBYTE , $text)) {

I added TINYIB_WORDBREAK_MULTIBYTE according to issue #273, but it probably works without it.

2.If I specify "Hide until approved" as the "Action" of "Keywords", the post containing the Keyword is not displayed in "Status".

If the "Action" of "Keywords" is "Hide until approved" , the Poster makes a post that includes the Keyword, that post will not be displayed in "Status" etc. The only way to display a post is to specify the "Post ID" with "Moderate a post", but there is no way for the administrator to know the "Post ID" normally.

Also, even if I specify the "Post ID" with "Moderate a post" and display it, I cannot make the post Moderated.
It seems that the function to display "Hide until approved" posts and change them to Moderated has not yet been implemented.

I plan to add the ability to display a Post with "Hide until approved" in Status and the ability to make a Post Moderated with "Moderate a post".

3. IP address is crypt hash

Apart from that, is it by design that the IP address is a crypt hash?

IP address: $2y$12$S3VucmluaW5TYW4//////.D5LiCVOZu9fIKCUnH3t0s0sh06xTxR2

This is probably by design.
pdo.php : function insertPost($post)
$stm->execute(array($post['parent'], $now, $now, hashData(remoteAddress()), $post['name'], $post['tripcode'], $post['email'],

Several issues were identified when I specified "Manage mode >> keywords". ### 1. Failure when "Regular expression" option is enabled If I specify the "Regular expression" option in "Manage mode >> keywords", when I post, the post succeeds, but keyword confirmation fails. Since the following error is displayed, it is thought that the delimiter has not been specified in "preg_match ". > regexp:k.{0,5}o.{0,5}u.{0,5}shirou : Hide until approved When posts: > Warning: preg_match(): Delimiter must not be alphanumeric or backslash in /var/www/html/imgboard/inc/functions.php on line 365 I tentatively modified it as follows. functions.php : function checkKeywords($text) `if (preg_match(substr($keyword['text'], 7), $text)) { ` to... `if (preg_match('/' . substr($keyword['text'],7) . '/' . TINYIB_WORDBREAK_MULTIBYTE , $text)) {` I added _TINYIB_WORDBREAK_MULTIBYTE_ according to issue #273, but it probably works without it. ### 2.If I specify "Hide until approved" as the "Action" of "Keywords", the post containing the Keyword is not displayed in "Status". If the "Action" of "Keywords" is "Hide until approved" , the Poster makes a post that includes the Keyword, that post will not be displayed in "Status" etc. The only way to display a post is to specify the "Post ID" with "Moderate a post", but there is no way for the administrator to know the "Post ID" normally. Also, even if I specify the "Post ID" with "Moderate a post" and display it, I cannot make the post Moderated. It seems that the function to display "Hide until approved" posts and change them to Moderated has not yet been implemented. I plan to add the ability to display a Post with "Hide until approved" in Status and the ability to make a Post Moderated with "Moderate a post". ### 3. IP address is crypt hash Apart from that, is it by design that the IP address is a crypt hash? > IP address: $2y$12$S3VucmluaW5TYW4//////.D5LiCVOZu9fIKCUnH3t0s0sh06xTxR2 This is probably by design. pdo.php : function insertPost($post) `$stm->execute(array($post['parent'], $now, $now, hashData(remoteAddress()), $post['name'], $post['tripcode'], $post['email'],`
tslocum added the
bug
label 2023-09-09 16:20:32 +00:00
Owner

Thanks. I will look into this more when I have the time.

is it by design that the IP address is a crypt hash?

Yes. This was done to expose as little real information as possible about users' IP addresses, while still supporting banning by IP.

Thanks. I will look into this more when I have the time. > is it by design that the IP address is a crypt hash? Yes. This was done to expose as little real information as possible about users' IP addresses, while still supporting banning by IP.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: tslocum/tinyib#282
No description provided.