File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package mfa
2
2
3
3
import (
4
4
"bytes"
5
+ "errors"
5
6
"fmt"
6
7
"io"
7
8
"log"
@@ -234,19 +235,19 @@ func getWebauthnMetaFromRequest(r *http.Request) (WebauthnMeta, error) {
234
235
// check that required fields are provided
235
236
if meta .RPDisplayName == "" {
236
237
msg := "missing required header: x-mfa-RPDisplayName"
237
- return WebauthnMeta {}, fmt . Errorf (msg )
238
+ return WebauthnMeta {}, errors . New (msg )
238
239
}
239
240
if meta .RPID == "" {
240
241
msg := "missing required header: x-mfa-RPID"
241
- return WebauthnMeta {}, fmt . Errorf (msg )
242
+ return WebauthnMeta {}, errors . New (msg )
242
243
}
243
244
if meta .Username == "" {
244
245
msg := "missing required header: x-mfa-Username"
245
- return WebauthnMeta {}, fmt . Errorf (msg )
246
+ return WebauthnMeta {}, errors . New (msg )
246
247
}
247
248
if meta .UserDisplayName == "" {
248
249
msg := "missing required header: x-mfa-UserDisplayName"
249
- return WebauthnMeta {}, fmt . Errorf (msg )
250
+ return WebauthnMeta {}, errors . New (msg )
250
251
}
251
252
252
253
return meta , nil
You can’t perform that action at this time.
0 commit comments