Merge pull request #49544 from nextcloud/backport/49541/stable30

This commit is contained in:
Benjamin Gaussorgues 2024-11-28 13:01:18 +01:00 committed by GitHub
commit 642110942d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -100,10 +100,11 @@ class ExternalSharesController extends Controller {
*
* @param string $remote
* @return DataResponse
* @AnonRateThrottle(limit=5, period=120)
*/
#[PublicPage]
public function testRemote($remote) {
if (str_contains($remote, '#') || str_contains($remote, '?') || str_contains($remote, ';')) {
if (preg_match('%[!#$&\'()*+,;=?@[\]]%', $remote)) {
return new DataResponse(false);
}