From 185282ff5484786dc89a1dfc8f3765c31410d13d Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 31 Jan 2026 14:07:48 +1030 Subject: [PATCH 1/4] fix: set chmod 755 on avatars-temp directory creation Fixes permission denied error on subsequent Docker builds --- app/Services/AvatarService.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Services/AvatarService.php b/app/Services/AvatarService.php index 4ecb24645..875a7d5ec 100644 --- a/app/Services/AvatarService.php +++ b/app/Services/AvatarService.php @@ -113,7 +113,11 @@ private static function processImage($avatarFile, int $profileId): string $tempFileName = 'avatar-'.$profileId.'-'.time().'.jpg'; $tempPath = storage_path('app/avatars-temp/'.$tempFileName); - Storage::disk('local')->makeDirectory('avatars-temp'); + $dirPath = storage_path('app/avatars-temp'); + if (! is_dir($dirPath)) { + Storage::disk('local')->makeDirectory('avatars-temp'); + chmod($dirPath, 0755); + } Image::read($avatarFile) ->cover(300, 300) From 1ab9e3e1d723468d4dff519e71be117bfcb1886d Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 31 Jan 2026 14:19:05 +1030 Subject: [PATCH 2/4] fix: strip spaces from verification code input Users can now copy-paste verification codes with spaces (e.g. '1 2 3 4 5 6') and they will be automatically cleaned to '123456' before validation. Fixes #418 --- resources/js/components/AuthModal.vue | 8 ++++++-- resources/js/pages/auth/app-register.vue | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/resources/js/components/AuthModal.vue b/resources/js/components/AuthModal.vue index 3d1a278d9..08f8d1ae1 100644 --- a/resources/js/components/AuthModal.vue +++ b/resources/js/components/AuthModal.vue @@ -1221,7 +1221,11 @@ const handleVerifyCode = async () => { clearMessages() loading.value = true - if (form.value.verificationCode?.length != 6) { + // Strip spaces and non-numeric characters from the code + const cleanCode = form.value.verificationCode?.replace(/[^0-9]/g, '') || '' + form.value.verificationCode = cleanCode + + if (cleanCode.length != 6) { setError(t('common.invalidCodeLength')) setTimeout(() => { clearMessages() @@ -1232,7 +1236,7 @@ const handleVerifyCode = async () => { try { await authStore - .verifyEmailVerification(form.value.email, form.value.verificationCode) + .verifyEmailVerification(form.value.email, cleanCode) .then((res) => { registrationStep.value = 3 setSuccess(t('common.emailVerifiedSuccessfully')) diff --git a/resources/js/pages/auth/app-register.vue b/resources/js/pages/auth/app-register.vue index 486736b8e..d4e7ec6ac 100644 --- a/resources/js/pages/auth/app-register.vue +++ b/resources/js/pages/auth/app-register.vue @@ -751,7 +751,11 @@ const handleVerifyCode = async () => { clearMessages() loading.value = true - if (form.value.verificationCode?.length != 6) { + // Strip spaces and non-numeric characters from the code + const cleanCode = form.value.verificationCode?.replace(/[^0-9]/g, '') || '' + form.value.verificationCode = cleanCode + + if (cleanCode.length != 6) { setError(t('common.invalidCodeLength')) setTimeout(() => { clearMessages() @@ -762,7 +766,7 @@ const handleVerifyCode = async () => { try { await authStore - .verifyEmailVerification(form.value.email, form.value.verificationCode) + .verifyEmailVerification(form.value.email, cleanCode) .then((res) => { registrationStep.value = 3 setSuccess(t('common.emailVerifiedSuccessfully')) From 710d509611f8c8eb869317357c739b16edd92e5c Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 31 Jan 2026 15:03:01 +1030 Subject: [PATCH 3/4] Revert "fix: set chmod 755 on avatars-temp directory creation" This reverts commit 185282ff5484786dc89a1dfc8f3765c31410d13d. --- app/Services/AvatarService.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/Services/AvatarService.php b/app/Services/AvatarService.php index 875a7d5ec..4ecb24645 100644 --- a/app/Services/AvatarService.php +++ b/app/Services/AvatarService.php @@ -113,11 +113,7 @@ private static function processImage($avatarFile, int $profileId): string $tempFileName = 'avatar-'.$profileId.'-'.time().'.jpg'; $tempPath = storage_path('app/avatars-temp/'.$tempFileName); - $dirPath = storage_path('app/avatars-temp'); - if (! is_dir($dirPath)) { - Storage::disk('local')->makeDirectory('avatars-temp'); - chmod($dirPath, 0755); - } + Storage::disk('local')->makeDirectory('avatars-temp'); Image::read($avatarFile) ->cover(300, 300) From 4e9664f306756d49f8769fa949ae032a439343e1 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 31 Jan 2026 17:34:28 +1030 Subject: [PATCH 4/4] prettier --- resources/js/components/AuthModal.vue | 10 ++++------ resources/js/pages/auth/app-register.vue | 10 ++++------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/resources/js/components/AuthModal.vue b/resources/js/components/AuthModal.vue index 08f8d1ae1..d6c28cf67 100644 --- a/resources/js/components/AuthModal.vue +++ b/resources/js/components/AuthModal.vue @@ -1235,12 +1235,10 @@ const handleVerifyCode = async () => { } try { - await authStore - .verifyEmailVerification(form.value.email, cleanCode) - .then((res) => { - registrationStep.value = 3 - setSuccess(t('common.emailVerifiedSuccessfully')) - }) + await authStore.verifyEmailVerification(form.value.email, cleanCode).then((res) => { + registrationStep.value = 3 + setSuccess(t('common.emailVerifiedSuccessfully')) + }) } catch (err) { console.error('Verification error:', err) diff --git a/resources/js/pages/auth/app-register.vue b/resources/js/pages/auth/app-register.vue index d4e7ec6ac..427aa60ce 100644 --- a/resources/js/pages/auth/app-register.vue +++ b/resources/js/pages/auth/app-register.vue @@ -765,12 +765,10 @@ const handleVerifyCode = async () => { } try { - await authStore - .verifyEmailVerification(form.value.email, cleanCode) - .then((res) => { - registrationStep.value = 3 - setSuccess(t('common.emailVerifiedSuccessfully')) - }) + await authStore.verifyEmailVerification(form.value.email, cleanCode).then((res) => { + registrationStep.value = 3 + setSuccess(t('common.emailVerifiedSuccessfully')) + }) } catch (err) { console.error('Verification error:', err)