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

Block editing breaks the site with memory exhaustion when the user has uid = 1 #176

Open
walkero-gr opened this issue Oct 13, 2024 · 0 comments

Comments

@walkero-gr
Copy link

There is a problem with the module when a user with uid = 1 tries to edit the blocks. The code goes into an infinite loop in the categories field and then gives 500 error with a message like below

PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 32768 bytes) in /var/www/clients/client3/web60/web/class/logger/render.php on line 1, referer: https://www.amigans.net/modules/system/admin.php?fct=blocksadmin

I tracked it down to the following part of the code, which when I disabled it everything worked fine.
https://github.com/XoopsModules25x/publisher/blob/1.07_FINAL/class/CategoryHandler.php#L214-L216

My question is why this takes in consideration the uid and what is the purpose of this code. Because, as much as I understand it, this returns all the categories, no matter their level, and then the code that gets the subdomains loops indefinitely.

I noticed that this code is in the latest code in the master branch. Maybe that bug exists even in newer versions, which I haven't tested.

My test environment:
PHP 7.3
Xoops 2.5.10
Publisher 1.07 FINAL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant