Also disallow ; in remote urls
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
5e402f8aae
commit
609b8aff12
|
@ -131,7 +131,7 @@ class ExternalSharesController extends Controller {
|
||||||
* @return DataResponse
|
* @return DataResponse
|
||||||
*/
|
*/
|
||||||
public function testRemote($remote) {
|
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);
|
return new DataResponse(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -162,6 +162,7 @@ class ExternalShareControllerTest extends \Test\TestCase {
|
||||||
return [
|
return [
|
||||||
['nextcloud.com?query'],
|
['nextcloud.com?query'],
|
||||||
['nextcloud.com/#anchor'],
|
['nextcloud.com/#anchor'],
|
||||||
|
['nextcloud.com/;tomcat'],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue