parent
40f4cc72ae
commit
0a4ff49cbb
|
@ -478,6 +478,7 @@ var commands = &CommandControl{
|
|||
case AccessPin:
|
||||
// A pin/password was provided, use it.
|
||||
if len(args) == 2 {
|
||||
// TODO: make this a bit more robust. Currently, only accepts a single word as a pin/password
|
||||
settings.RoomAccessPin = args[1]
|
||||
|
||||
// A pin/password was not provided, generate a new one.
|
||||
|
|
|
@ -179,7 +179,7 @@ func checkRoomAccess(w http.ResponseWriter, r *http.Request) bool {
|
|||
http.Error(w, "Unable to get session data", http.StatusInternalServerError)
|
||||
}
|
||||
|
||||
postPin := r.Form.Get("txtInput")
|
||||
postPin := strings.TrimSpace(r.Form.Get("txtInput"))
|
||||
common.LogDebugf("Received pin: %s\n", postPin)
|
||||
if postPin == settings.RoomAccessPin {
|
||||
// Pin is correct. Save it to session and return true.
|
||||
|
|
Loading…
Reference in New Issue