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
MYSQL Syntax Error - When listing whitelist/blacklist #1067
Comments
The variable $global_list should never be empty as it will be set by https://github.com/mailwatch/MailWatch/blob/1.2/mailscanner/checklogin.php#L127-L154 Is this happening for all users? |
Feel free to close my last 3 issues. I didn't set the user type to A at the time of user creation. That resolved the problem.
The code spews out errors if the user type is not set, so the usertype field should be a non null in create.sql
…On May 10, 2018, 5:57 PM, at 5:57 PM, Michael Pietsch ***@***.***> wrote:
The variable $global_list should never be empty as it will be set by
https://github.com/mailwatch/MailWatch/blob/1.2/mailscanner/checklogin.php#L127-L154
Is this happening for all users?
--
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub:
#1067 (comment)
|
This was referenced May 10, 2018
endelwar
pushed a commit
that referenced
this issue
May 10, 2018
endelwar
pushed a commit
that referenced
this issue
Jun 20, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Fresh installation of MailWatch 1.2.9
Blank whitelist/blanklist.
PHP Error thrown
"PHP message: PHP Fatal error: Uncaught mysqli_sql_exception: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY from_address'
in lists.php at line 416Query in php
NOTE - It also affects every part of the code where
$_SESSION['global_list']
is used.Cause of the problem, $_SESSION['global_list'] is set to blank in checklogin.php line 165
$_SESSION['global_list'] = (isset($global_list) ? $global_list : '');
My fix/patch,
$_SESSION['global_list'] = (isset($global_list) ? $global_list : '1=1');
The text was updated successfully, but these errors were encountered: