aboutsummaryrefslogtreecommitdiff
path: root/OutboxPost.go
diff options
context:
space:
mode:
Diffstat (limited to 'OutboxPost.go')
-rw-r--r--OutboxPost.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/OutboxPost.go b/OutboxPost.go
index b51e7cc..f509b04 100644
--- a/OutboxPost.go
+++ b/OutboxPost.go
@@ -503,8 +503,10 @@ func CheckCaptcha(db *sql.DB, captcha string) bool {
path := "public/" + parts[0] + ".png"
code := GetCaptchaCodeDB(db, path)
- DeleteCaptchaCodeDB(db, path)
- CreateNewCaptcha(db)
+ if code != "" {
+ DeleteCaptchaCodeDB(db, path)
+ CreateNewCaptcha(db)
+ }
if (code == strings.ToUpper(parts[1])) {
return true