Skip to content

Commit

Permalink
Restrict shortcut name (#11707)
Browse files Browse the repository at this point in the history
* Restrict shortcut name

* Add changelog item
  • Loading branch information
AlexAndBear authored Oct 2, 2024
1 parent 76dab02 commit 7e2fe95
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions packages/web-pkg/src/components/CreateShortcutModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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 ''
})
Expand Down

0 comments on commit 7e2fe95

Please sign in to comment.