ELdoBA/FusionCMS

Incorrect operation of 404

Haeniken opened this issue · 2 comments

Describe the bug
Incorrect operation of 404.

When you try to go to a non-existent site page (for example site.com/askdjaksjdk), there is a huge number of requests to the database, such as:

SELECT * FROM sideboxes ORDER BY `order` ASC

Collected the system call log, and it look like this:

\0\0\4\3def\fhaeniken_1si\tsideboxes\tsideboxes\vdisplayName\vdisplayName\f!\0\375\377\2\0\374\20\0\0\0\0J\0\0\5\3def\fhaeniken_1si\tsideboxes\tsideboxes\vrank_needed\vrank_needed\f?\0\n\0\0\0\3\t@\0\0\0>\0\0\6\3def\fhaeniken_1si\tsideboxes\tsideboxes\5order\5order\f?\0\v\0\0\0\3\0\0\0\0\0H\0\0\7\3def\fhaeniken_1si\tsideboxes\tsideboxes\npermission\npermission\f!\0\226\0\0\0\375\0\0\0\0\0\5\0\0\10\376\0\0\"\0\34\0\0\t\0012\ninfo_login\tUser area\0012\0011\373\34\0\0\n\0011\6status\rServer status\0011\0012\373\32\0\0\v\0013\10shoutbox\tShout box\0011\0013\373\5\0\0\f\376\0\0\"\0", 32768, MSG_DONTWAIT, NULL, NULL) = 539 <0.000016>
22:20:14.382542 [ 7f9c41a7b247] access("application/modules/sidebox_info_login/controllers/info_login.php", F_OK) = 0 <0.000024>
22:20:14.382623 [ 7f9c41a7bc02] getcwd("/home/h/haeniken/blablablawow/public_html", 4096) = 49 <0.000015>
22:20:14.382758 [ 7f9c41a7a775] stat("application/modules/asdasdasda", 0x7fff640772a0) = -1 ENOENT (No such file or directory) <0.000019>
22:20:14.382842 [ 7f9c41a7b247] access("application/themes/default/modules/error/error.tpl", F_OK) = -1 ENOENT (No such file or directory) <0.000019>
22:20:14.382984 [ 7f9c41a7bc02] getcwd("/home/h/haeniken/blablablawow/public_html", 4096) = 49 <0.000015>
22:20:14.383072 [ 7f9c41d6d96a] sendto(11, "-\0\0\0\3SELECT * FROM sideboxes ORDER BY `order` ASC", 49, MSG_DONTWAIT, NULL, 0) = 49 <0.000021>
22:20:14.383150 [ 7f9c41a7fbc4] poll([{fd=11, events=POLLIN|POLLERR|POLLHUP}], 1, 86400000) = 1 ([{fd=11, revents=POLLIN}]) <0.000070>
22:20:14.383270 [ 7f9c41d6d7ea] recvfrom(11, "\1\0\0\1\0068\0\0\2\3def\fhaeniken_1si\tsideboxes\tsideboxes\2id\2id\f?\0\v\0\0\0\3\3B\0\0\0<\0\0\3\3def\fhaeniken_1si\tsideboxes\tsideboxes\4type\4type\f!\0\226\0\0\0\375\1\0\0\0\0J

And it can be really problem - 10444 selects:

$ cat log_2021-02-10_22-20-14.12571 | grep -i select | grep -i sideboxes | wc -l
10444

$curl -L -q -o /dev/null -w "\nConnect: %{time_connect}\nTTFB: %{time_starttransfer}\nTotal time: %{time_total} \n" https://blablablawow/asdasdasd
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 232 0 232 0 0 68 0 —:--:— 0:00:03 —:--:— 72
100 20267 0 20267 0 0 5817 0 —:--:— 0:00:03 —:--:— 5817

Connect: 0,000
TTFB: 0,118
Total time: 3,484

After off all modules with 'Sidebox` name, it not fixed.

clean install, was tested on php 5.6 and 7.4

Heppy birthday issue !