1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-01 14:30:32 +02:00

[ticket/17398] Use referer for web paths in ajax requests

PHPBB-17398
This commit is contained in:
Marc Alexander
2024-10-09 20:16:30 +02:00
parent ecceeab709
commit fd58e4f338
3 changed files with 6 additions and 6 deletions

View File

@@ -470,9 +470,6 @@ class phpbb_path_helper_test extends phpbb_test_case
->setConstructorArgs([new phpbb_mock_request()])
->setMethods(['get', 'getSchemeAndHttpHost', 'getBasePath', 'getPathInfo'])
->getMock();
$symfony_request->method('get')
->with('_referer')
->willReturn('http://www.phpbb.com/community/route1/route2/');
$symfony_request->method('getSchemeAndHttpHost')
->willReturn('http://www.phpbb.com');
$symfony_request->method('getBasePath')
@@ -486,6 +483,9 @@ class phpbb_path_helper_test extends phpbb_test_case
->willReturn(true);
$request->method('escape')
->willReturnArgument(0);
$request->method('header')
->with('Referer')
->willReturn('http://www.phpbb.com/community/route1/route2/');
$path_helper = new \phpbb\path_helper(
$symfony_request,