Fix authorization
parent
ad5f6b8db5
commit
57a75ef495
|
@ -135,8 +135,9 @@ func HandleWHIP(res http.ResponseWriter, req *http.Request) {
|
|||
}
|
||||
|
||||
streamName, streamPassword, _ := strings.Cut(authorization, ":")
|
||||
if db.QueryRow("SELECT * FROM streams WHERE stream = ? AND password = ?", streamName, streamPassword).Err() != nil {
|
||||
if err := db.QueryRow("SELECT * FROM streams WHERE stream = ? AND password = ?", streamName, streamPassword).Scan(); err != nil {
|
||||
logHTTPError(res, "Invalid stream authorization", http.StatusUnauthorized)
|
||||
return
|
||||
}
|
||||
|
||||
offer, err := io.ReadAll(req.Body)
|
||||
|
|
Loading…
Reference in New Issue