Remove URL syntax validation for provider address entirely
Signed-off-by: Matheus Pimenta <matheuscscp@gmail.com>
This commit is contained in:
parent
e48be82c89
commit
143a0b3ee0
|
|
@ -281,10 +281,6 @@ func createNotifier(ctx context.Context, kubeClient client.Client, provider apiv
|
|||
return nil, "", fmt.Errorf("invalid address in secret: address exceeds maximum length of %d bytes", 2048)
|
||||
}
|
||||
webhook = string(address)
|
||||
_, err := url.Parse(webhook)
|
||||
if err != nil {
|
||||
return nil, "", fmt.Errorf("invalid address in secret '%s': %w", webhook, err)
|
||||
}
|
||||
}
|
||||
|
||||
if p, ok := secret.Data["password"]; ok {
|
||||
|
|
|
|||
|
|
@ -570,17 +570,6 @@ func TestCreateNotifier(t *testing.T) {
|
|||
"headers": []byte(`foo: bar`),
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "reference to secret with invalid address",
|
||||
providerSpec: &apiv1beta3.ProviderSpec{
|
||||
Type: "slack",
|
||||
SecretRef: &meta.LocalObjectReference{Name: secretName},
|
||||
},
|
||||
secretData: map[string][]byte{
|
||||
"address": []byte("https://example.com|"),
|
||||
},
|
||||
wantErr: true,
|
||||
},
|
||||
{
|
||||
name: "reference to secret with invalid proxy",
|
||||
providerSpec: &apiv1beta3.ProviderSpec{
|
||||
|
|
|
|||
Loading…
Reference in New Issue