Changeset 692 for trunk/lib


Ignore:
Timestamp:
Jun 22, 2019 3:01:53 AM (5 years ago)
Author:
anonymous
Message:

misc

Location:
trunk/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/App.inc.php

    r690 r692  
    114114        'date_format' => 'd M Y',
    115115        'time_format' => 'h:i:s A',
     116        'lc_date_format' => '%e %b %Y', // Localized date for strftime() https://www.php.net/manual/en/function.strftime.php
     117        'lc_time_format' => '%k:%M', // Localized time for strftime() https://www.php.net/manual/en/function.strftime.php
    116118        'sql_date_format' => '%e %b %Y',
    117119        'sql_time_format' => '%k:%i',
     
    386388        // If external request was HTTPS but internal request is HTTP, set $_SERVER['HTTPS']='on', which is used by the application to determine that TLS features should be enabled.
    387389        if (strtolower(getenv('HTTP_X_FORWARDED_PROTO')) == 'https' && strtolower(getenv('REQUEST_SCHEME')) == 'http') {
     390            $this->logMsg(sprintf('Detected HTTPS via X-Forwarded-Proto; setting HTTPS=on', null), LOG_DEBUG, __FILE__, __LINE__);
    388391            putenv('HTTPS=on'); // Available via getenv(
)
    389392            isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] = 'on'; // Available via $_SERVER[
]
     
    14441447        }
    14451448
    1446         if (!$url) {
     1449        if ('' == $url) {
    14471450            // If URL is not specified, use the redirect_home_url.
    14481451            $url = $this->getParam('redirect_home_url');
     
    14621465
    14631466        // End application.
    1464         // Recommended, although I'm not sure it's necessary: http://cn2.php.net/session_write_close
     1467        // Recommended, although I'm not sure it's necessary: https://www.php.net/session_write_close
    14651468        $this->stop();
    14661469        die;
  • trunk/lib/Auth_SQL.inc.php

    r690 r692  
    433433            return false;
    434434        }
     435
     436        // TODO: log all auth attempts to db_login_table, not just successful ones. Then, rate-limit login attempts.
    435437
    436438        // Check given password against hashed DB password.
Note: See TracChangeset for help on using the changeset viewer.