Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send Friend bot abuse -- non-existent item id PHP notices #2239

Open
dev-101 opened this issue Dec 6, 2017 · 0 comments

Comments

@dev-101
Copy link
Contributor

commented Dec 6, 2017

Hi, I was hit by some stupid bot checking constantly my send-friend pages with item IDs which were either removed or disabled, and this was constantly filling my log with notices in hDefines:

Osclass 3.7.4

https: // www . url .com/item/send-friend/ 123

PHP Notice:  Undefined index: fk_i_category_id in oc-includes/osclass/helpers/hDefines.php on line 491
PHP Notice:  Undefined index: pk_i_id in oc-includes/osclass/helpers/hDefines.php on line 497
PHP Notice:  Undefined index: s_city in oc-includes/osclass/helpers/hDefines.php on line 498
PHP Notice:  Undefined index: s_title in oc-includes/osclass/helpers/hDefines.php on line 499

Now, I've dealt with the bot all right, but these notices actually helped me track and discover "the pest", otherwise it would slip my radar.

And, that's why I am undecided if we should fix this or not. I mean, it's easy to fix, but it may be actually useful, assuming we know where to look. Less experienced users will probably fail to identify the problem and may think something is wrong with their setup. A compromise would be to throw custom error in the logs, so we get better insight where/why the notice originated from, so admins don't instantly panic :)

navjottomer added a commit to navjottomer/Osclass that referenced this issue Dec 24, 2017
BugFix: Fixed redirecting of item-send-friend page to base url and sh…
…ow error msg when item could not be found in database. As described here osclass#2239
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.