MantisBT: master-1.2.x e66ecc9f

Author Committer Branch Timestamp Parent
dregad dregad master-1.2.x 2014-12-03 12:18 master-1.2.x 662bcd2e
Affected Issues  0017648: CVE-2014-6316: URL redirection issue
Changeset

Fix URL redirection issue in login_page.php

When Mantis is installed at the web server's root, $g_short_path is set
to '/'. string_sanitize_url() removes the trailing '/' from the short
path, which causes the URL to be incorrectly categorized as "type 2",
thus allowing cross-site redirection to occur.

By making checking that the short path is not empty before setting URL
as type 2, we ensure that we categorize it as type 3, which then forces
the function's return value to 'index.php'

Fixes 0017648 (CVE-2014-6316)

mod - core/string_api.php Diff File