fix(core): Allow external sharing to plain http://localhost

Signed-off-by: provokateurin <kate@provokateurin.de>
This commit is contained in:
provokateurin 2026-02-23 09:50:40 +01:00 committed by nextcloud-command
parent f1e29d444f
commit e8feef1c9c

View file

@ -58,7 +58,7 @@ watch(remoteUrl, () => {
let validity = ''
if (!remoteUrl.value.includes('@')) {
validity = t('core', 'The remote URL must include the user.')
} else if (!remoteUrl.value.match(/@(.+\..{2,}|localhost)(:\d\d+)?$/)) {
} else if (!remoteUrl.value.match(/@(.+\..{2,}|(?:http:\/\/)?localhost)(:\d\d+)?$/)) {
validity = t('core', 'Invalid remote URL.')
}
input.value!.$el.querySelector('input')!.setCustomValidity(validity)