From 8254d6fcb22f3cf3c5d71f12f72bea1adc825b71 Mon Sep 17 00:00:00 2001 From: Natalie Rose Date: Wed, 9 Sep 2026 17:51:03 +1000 Subject: [PATCH] Filing this under "off by one errors that ruined my day" --- lib/Lacuna/CaptchaFactory.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/Lacuna/CaptchaFactory.pm b/lib/Lacuna/CaptchaFactory.pm index 9ab82a6d..879b6137 100644 --- a/lib/Lacuna/CaptchaFactory.pm +++ b/lib/Lacuna/CaptchaFactory.pm @@ -256,9 +256,8 @@ sub construct { compress=> 1, ); - my $dir = '/home/lacuna/server/public/captcha/'; - open my $file, '>', $dir.'/'.$self->guid.'.png' or - die "Can't write to $dir/".$self->guid.".png: $!"; + my $filepath = '/home/lacuna/server/public/captcha/'.$self->guid.'.png'; + open my $file, '>', $filepath or die "Can't write to $filepath: $!"; print {$file} $image; close $file; $captchas->create({ -- 2.51.2