diff --git a/changelog/unreleased/bugfix-prevent-not-allowed-characters-in-shortcut-name b/changelog/unreleased/bugfix-prevent-not-allowed-characters-in-shortcut-name new file mode 100644 index 00000000000..7afefcaa69a --- /dev/null +++ b/changelog/unreleased/bugfix-prevent-not-allowed-characters-in-shortcut-name @@ -0,0 +1,7 @@ +Bugfix: Prevent not allowed characters in shortcut name + +We've fixed an issue where not allowed characters were allowed in the shortcut name. +Now, the shortcut name will be validated and only allowed characters will be accepted. + +https://github.com/owncloud/web/pull/11707 +https://github.com/owncloud/web/issues/11702 diff --git a/packages/web-pkg/src/components/CreateShortcutModal.vue b/packages/web-pkg/src/components/CreateShortcutModal.vue index 4f55fc59152..0569c4659f0 100644 --- a/packages/web-pkg/src/components/CreateShortcutModal.vue +++ b/packages/web-pkg/src/components/CreateShortcutModal.vue @@ -213,6 +213,10 @@ export default defineComponent({ return $gettext('%{name} already exists', { name: `${unref(inputFilename)}.url` }) } + if (/[/]/.test(unref(inputFilename))) { + return $gettext('Shortcut name cannot contain "/"') + } + return '' })