[wp-trac] [WordPress Trac] #63896: is_login() will trigger on non-login pages
WordPress Trac
noreply at wordpress.org
Fri Aug 29 13:44:01 UTC 2025
#63896: is_login() will trigger on non-login pages
--------------------------+-----------------------------
Reporter: govpress | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 6.8.2
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
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 >
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63896>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list