Opened 13 months ago
Last modified 12 months ago
#63896 new defect (bug)
is_login() will trigger on non-login pages
| Reported by: | govpress | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Login and Registration | Version: | 6.8.2 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
The test for is_login() will falsely issue "true" in two circumstances we've observed.
1) the root page "/"
2) any page request that matches a part of the URL that follows a "/"
eg in this example a request for "/d" is a login page, but "/d/" is not.
php > $url = "https://documents.example.com/wp-login.php"; php > echo stripos($url, "/"); 6 php > echo stripos($url, "/documents"); 7 php > echo stripos($url, "/doc"); 7 php > echo stripos($url, "/d"); 7 php > echo stripos($url, "/d/"); php > echo stripos($url, "/wp-login.php"); 29 php > echo stripos($url, "/w"); 29 php > echo stripos($url, "/xxx"); php >
Attachments (1)
Change History (3)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
I should note that this is on a server nginx + fastcgi php-fm with the parameter
where the value of
_SERVER['SCRIPT_NAME']will usually be the path of the requested URL, not/index.php.