Issue tracker moved to https://gitlab.archlinux.org/archlinux/aurweb/-/issues
FS#31849 - Bad variable in rpc.php
Attached to Project:
AUR web interface
Opened by Arteom (arutemus) - Monday, 08 October 2012, 23:01 GMT
Last edited by Lukas Fleischer (lfleischer) - Sunday, 04 November 2012, 11:44 GMT
Opened by Arteom (arutemus) - Monday, 08 October 2012, 23:01 GMT
Last edited by Lukas Fleischer (lfleischer) - Sunday, 04 November 2012, 11:44 GMT
|
DetailsThe web server return the error 500 when the variable "arg" in the rpc.php is "in" or "ing".
For example bad urls: http://aur.archlinux.org/rpc.php?type=search&arg=in http://aur.archlinux.org/rpc.php?type=search&arg=ing |
This task depends upon
Closed by Lukas Fleischer (lfleischer)
Sunday, 04 November 2012, 11:44 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed in 2.0.0.
Sunday, 04 November 2012, 11:44 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed in 2.0.0.
----
Oct 8 19:11:38 localhost php-cgi: PHP Fatal error: Allowed memory size of 33554432 bytes exhausted [...]
----
A potential solution would be to use a LIMIT clause within the SQL query. Have it limit results to some amount that won't exceed the maximum memory usage. If resultcount equals the limit, have the JSON response be the "error" type with something like "Too many package results".
After some brief memory profiling, I'm betting a query up to 5000 results probably won't exceed 32M. So the search limit probably should be between 0 and 5000.
[1] https://projects.archlinux.org/aur.git/commit/?id=43a69e7127c65f2651a61300d3e32bf6f89a2595