diff --git a/frontend/pages/admin/login.vue b/frontend/pages/admin/login.vue index b98afdb..a51baa2 100644 --- a/frontend/pages/admin/login.vue +++ b/frontend/pages/admin/login.vue @@ -90,10 +90,11 @@ const awaiting_auth_response: Ref = ref(false) const redirect_query_param = useRoute().query.redirect let redirectUrl = '/admin/home' + // type checking of the query parameter to correspond to the signature of navigateTo if (typeof redirect_query_param === 'string') { // matching to keep only internal urls - const match = redirect_query_param.match('/admin*') + const match = redirect_query_param.match(/\/admin\/.+/) if (match) { redirectUrl = match[0] } diff --git a/frontend/pages/admin/users/[id].vue b/frontend/pages/admin/users/[id].vue index 2a6da8d..2d41c2e 100644 --- a/frontend/pages/admin/users/[id].vue +++ b/frontend/pages/admin/users/[id].vue @@ -24,7 +24,7 @@ />
@@ -34,11 +34,10 @@
@@ -90,7 +88,7 @@ const user = ref(isNew : await state.client.getUser(userId), ) -const editPassword = ref(false) +const editPassword = ref(isNew) const newPassword = ref('') const newPasswordConfirm = ref('') @@ -103,7 +101,7 @@ definePageMeta({ function isDisabled() { return processingRequest.value - || (editPassword.value && (newPassword.value != newPasswordConfirm.value || !!isValidText(newPassword.value))) + || (editPassword.value && (newPassword.value != newPasswordConfirm.value || !isValidText(newPassword.value))) || !isValidText(user.value.name) } diff --git a/frontend/pages/admin/users/self.vue b/frontend/pages/admin/users/self.vue index bc5b06a..150b61a 100644 --- a/frontend/pages/admin/users/self.vue +++ b/frontend/pages/admin/users/self.vue @@ -31,7 +31,7 @@ toggle-mask class=" -mt-2" input-class="w-full" - :invalid="editPassword && (newPassword!=newPasswordConfirm || !newPassword)" + :invalid="editPassword && !isValidText(newPassword)" />