mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-10-23 01:59:04 +02:00
refactor: standardize API error handling (#1635)
This commit is contained in:
@@ -8,6 +8,9 @@ import (
|
||||
)
|
||||
|
||||
func TestValidateCallbackURLPattern(t *testing.T) {
|
||||
// #nosec G101
|
||||
const wildcardUserinfoPattern = "https://user:*@example.com/callback"
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
pattern string
|
||||
@@ -35,7 +38,7 @@ func TestValidateCallbackURLPattern(t *testing.T) {
|
||||
},
|
||||
{
|
||||
name: "wildcard userinfo",
|
||||
pattern: "https://user:*@example.com/callback", // #nosec G101 - Test credential
|
||||
pattern: wildcardUserinfoPattern,
|
||||
shouldError: false,
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user