Here is few bugs I have found so far, may be I will remember some more that I patched for myself, so here is what i've found:
found bugs:
1) http://localhost/usercontrol/users/admin_user.php?id=2
not using global settings for name length
<pre>
2)
3) http://localhost/usercontrol/users/admin_permissions.php
<pre>
that decleared above - that 2 lines should be removed, preventing any message to appear
4) http://localhost/usercontrol/users/admin_permissions.php
5) http://localhost/usercontrol/users/profile.php?id=0
giving wrong id, resulting in banch of errors
Security issues:
1) http://localhost/usercontrol/users/admin.php
2 forms have no csrf protection - adding session token will solve that (i am using both session and per-request tokens)
2) http://localhost/usercontrol/users/admin_permission.php?id=1
3) user name validation - user can create crazy names like <script>lala - should not allow that
That may be not bugs but logic flaws:
1) http://localhost/usercontrol/users/joinThankYou.php - should redirect if logged in?
2) http://localhost/usercontrol/users/join.php - should redirect if logged in?
3) http://localhost/usercontrol/users/login.php - should redirect if logged in?
4) http://localhost/usercontrol/users/maintenance.php - should redirect if no maintenance?
found bugs:
1) http://localhost/usercontrol/users/admin_user.php?id=2
not using global settings for name length
line 57, 58 should be changed to<pre>
'min' => $settings->min_un,
'max' => $settings->max_un</pre>2)
function display_errors($errors = array()) - helpers.php - remove echo "<br>" - that br resulting content to slip below on every page that function called3) http://localhost/usercontrol/users/admin_permissions.php
line 97,98 - dublicate of<pre>
$errors = [];
$successes = [];</pre>that decleared above - that 2 lines should be removed, preventing any message to appear
4) http://localhost/usercontrol/users/admin_permissions.php
line 65 - echoing error to nowere, appearing above in black ugly blockecho "Permission Updated";
should be$successes[] = 'TEXT';
5) http://localhost/usercontrol/users/profile.php?id=0
giving wrong id, resulting in banch of errors
Security issues:
1) http://localhost/usercontrol/users/admin.php
2 forms have no csrf protection - adding session token will solve that (i am using both session and per-request tokens)
2) http://localhost/usercontrol/users/admin_permission.php?id=1
line 28, value of $_GET is not sanitized3) user name validation - user can create crazy names like <script>lala - should not allow that
That may be not bugs but logic flaws:
1) http://localhost/usercontrol/users/joinThankYou.php - should redirect if logged in?
2) http://localhost/usercontrol/users/join.php - should redirect if logged in?
3) http://localhost/usercontrol/users/login.php - should redirect if logged in?
4) http://localhost/usercontrol/users/maintenance.php - should redirect if no maintenance?