mirror of
https://github.com/WiiLink24/wfc-server.git
synced 2026-09-26 01:05:32 -05:00
NAS: Support uppercase actions
This commit is contained in:
10
nas/auth.go
10
nas/auth.go
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user