NAS: Support uppercase actions

This commit is contained in:
mkwcat
2024-02-03 16:23:16 -05:00
parent 7d9371cd03
commit 1eaece3f54

View File

@@ -63,7 +63,7 @@ func handleAuthRequest(moduleName string, w http.ResponseWriter, r *http.Request
return
}
if key == "ingamesn" {
if key == "ingamesn" || key == "devname" {
// Special handling required for the UTF-16 string
var utf16String []uint16
if unitcdString == "0" {
@@ -99,7 +99,7 @@ func handleAuthRequest(moduleName string, w http.ResponseWriter, r *http.Request
return
}
switch action {
switch strings.ToLower(action) {
case "acctcreate":
reply = acctcreate()
break
@@ -113,10 +113,6 @@ func handleAuthRequest(moduleName string, w http.ResponseWriter, r *http.Request
reply = svcloc(fields)
break
case "SVCLOC":
reply = svcloc(fields)
break
default:
logging.Error(moduleName, "Unknown action:", aurora.Cyan(action))
reply = map[string]string{
@@ -149,7 +145,7 @@ func handleAuthRequest(moduleName string, w http.ResponseWriter, r *http.Request
return
}
switch action {
switch strings.ToLower(action) {
case "count":
response = []byte(dlsCount(fields))
break