Menu

#2826 configtest failes when executed externally due to not set variables

Produces PHP errors
closed-fixed
None
5
2015-01-28
2015-01-23
No

using configtest.php externally (with $allow_remote_configtest = true) fails with error message:

Notice: Undefined variable: client_ip in /srv/www/de/realmo/webmail/docs/src/configtest.php on line 655
Notice: Undefined variable: client_ip in /srv/www/de/realmo/webmail/docs/src/configtest.php on line 658

FATAL ERROR: SMTP EHLO failed. You need ESMTP support for SMTP STARTTLS

SquirrelMail version: 1.5.2 [SVN] (from 2015-01-23)

proposed fix:
move the lines 178+179 to before the check of $allow_remote_configtest
before:

/ Block remote use of script /
if (! $allow_remote_configtest) {
sqGetGlobalVar('REMOTE_ADDR',$client_ip,SQ_SERVER);
sqGetGlobalVar('SERVER_ADDR',$server_ip,SQ_SERVER);

if ((! isset($client_ip) || ...

<<

fixed:

sqGetGlobalVar('REMOTE_ADDR',$client_ip,SQ_SERVER);
sqGetGlobalVar('SERVER_ADDR',$server_ip,SQ_SERVER);

/ Block remote use of script /
if (! $allow_remote_configtest) {
if ((! isset($client_ip) || ...
<<

Discussion

  • Paul Lesniewski

    Paul Lesniewski - 2015-01-28
    • status: open --> closed-fixed
    • assigned_to: Paul Lesniewski
    • Group: Can't Reproduce --> Produces PHP errors
     
  • Paul Lesniewski

    Paul Lesniewski - 2015-01-28

    Committed fix. Thank you!

     

Log in to post a comment.