#26: Fixed frontend app authentication issues

This commit is contained in:
frikky
2020-07-17 08:35:48 +02:00
parent 7c0dda2c52
commit cdfd2a52ae
5 changed files with 138 additions and 91 deletions
+3 -2
View File
@@ -3445,7 +3445,8 @@ func addAppAuthentication(resp http.ResponseWriter, request *http.Request) {
return
}
if len(appAuth.App.ID) != 36 {
// Super basic check
if len(appAuth.App.ID) != 36 && len(appAuth.App.ID) != 32 {
log.Printf("Bad ID for app: %s", appAuth.App.ID)
resp.WriteHeader(409)
resp.Write([]byte(fmt.Sprintf(`{"success": false, "reason": "App has to be defined"}`)))
@@ -3530,7 +3531,7 @@ func getAppAuthentication(resp http.ResponseWriter, request *http.Request) {
for _, auth := range allAuths {
newAuthField := auth
for index, _ := range auth.Fields {
newAuthField.Fields[index].Value = ""
newAuthField.Fields[index].Value = "auth placeholder (replaced during execution)"
}
newAuth = append(newAuth, newAuthField)