Browse Source

Also disallow ; in remote urls

Signed-off-by: Joas Schilling <coding@schilljs.com>
tags/v19.0.0beta3
Joas Schilling 4 years ago
parent
commit
609b8aff12
No account linked to committer's email address

+ 1
- 1
apps/files_sharing/lib/Controller/ExternalSharesController.php View File

@@ -131,7 +131,7 @@ class ExternalSharesController extends Controller {
* @return DataResponse
*/
public function testRemote($remote) {
if (strpos($remote, '#') !== false || strpos($remote, '?') !== false) {
if (strpos($remote, '#') !== false || strpos($remote, '?') !== false || strpos($remote, ';') !== false) {
return new DataResponse(false);
}


+ 1
- 0
apps/files_sharing/tests/Controller/ExternalShareControllerTest.php View File

@@ -162,6 +162,7 @@ class ExternalShareControllerTest extends \Test\TestCase {
return [
['nextcloud.com?query'],
['nextcloud.com/#anchor'],
['nextcloud.com/;tomcat'],
];
}


Loading…
Cancel
Save