aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFChannel <>2021-05-14 09:46:04 -0700
committerFChannel <>2021-05-14 09:46:04 -0700
commit30714d5e76a94947a49487f526e48a996f1d9eaa (patch)
treef16aa2e7832557203d43b3a3e91513376e6a0f1d
parentc6ea2bf6fe01fc9da82b9643f4673dfc91f4e23d (diff)
tripcode empty fix
-rw-r--r--databaseschema.psql2
-rw-r--r--main.go3
2 files changed, 3 insertions, 2 deletions
diff --git a/databaseschema.psql b/databaseschema.psql
index 7e2443c..eac2c34 100644
--- a/databaseschema.psql
+++ b/databaseschema.psql
@@ -209,4 +209,4 @@ type varchar(25)
ALTER TABLE activitystream ADD COLUMN IF NOT EXISTS tripcode varchar(50) default '';
-ALTER TABLE cacheactivitystream ADD COLUMN IF NOT EXISTS tripcode varchar(50) default ''; \ No newline at end of file
+ALTER TABLE cacheactivitystream ADD COLUMN IF NOT EXISTS tripcode varchar(50) default '';
diff --git a/main.go b/main.go
index 378b767..bd88c41 100644
--- a/main.go
+++ b/main.go
@@ -954,10 +954,11 @@ func CreateNameTripCode(r *http.Request, db *sql.DB) (string, string) {
board, modcred := GetPasswordFromSession(r)
if(admin && HasAuth(db, modcred, board)) {
return re.ReplaceAllString(input, ""), "#Admin"
- } else {
+ } else if(chunck != "") {
hash := CreateTripCode(chunck)
return re.ReplaceAllString(input, ""), "!" + hash[42:50]
}
+ return input, ""
}
func GetActorFromPath(db *sql.DB, location string, prefix string) Actor {