add more sms debugging

This commit is contained in:
Aaron Bieber 2024-05-28 14:26:56 -06:00
parent 5e36de4051
commit ec0f19341a
No known key found for this signature in database

View File

@ -34,6 +34,7 @@ func SMSListen(store ChatStore, plugins *plugins.Plugins) {
var msg, from string var msg, from string
user, pass, ok := r.BasicAuth() user, pass, ok := r.BasicAuth()
err := bcrypt.CompareHashAndPassword([]byte(htpass), []byte(pass)) err := bcrypt.CompareHashAndPassword([]byte(htpass), []byte(pass))
log.Printf("OK: %#v\nERR: %#v\nUSER: %#v\n", ok, err, user)
if !(ok && err == nil && user == "sms") { if !(ok && err == nil && user == "sms") {
log.Printf("SMS: failed auth %q %q\n", user, pass) log.Printf("SMS: failed auth %q %q\n", user, pass)
w.Header().Set("WWW-Authenticate", `Basic realm="sms notify"`) w.Header().Set("WWW-Authenticate", `Basic realm="sms notify"`)