-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add missing control char on regex validation #9465
Conversation
@rikatz: This issue is currently awaiting triage. If Ingress contributors determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rikatz The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
15ce020
to
cd9e774
Compare
/retest |
The latest version of nginx-ingress appears to be suddenly returning errors and failing for all of my paths. Here is an example: rules:
- http:
paths:
- pathType: Prefix
path: /example(/|$)(.*) I'd just like to make sure that the changes you're putting in place account for this path, which doesn't include |
Fixed release will be out in few days.
…On Fri, 13 Jan, 2023, 7:49 pm Justin Chase, ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In internal/ingress/controller/controller_test.go
<#9465 (comment)>
:
> + t.Run("When invalid path is passed to Ingress", func(t *testing.T) {
+ nginx.store = fakeIngressStore{
+ ingresses: []*ingress.Ingress{},
+ }
+ nginx.command = testNginxTestCommand{
+ t: t,
+ err: nil,
+ }
+ ing.Spec.Rules[0].HTTP.Paths = append(ing.Spec.Rules[0].HTTP.Paths, networking.HTTPIngressPath{
+ Path: "/foo/bar/;xpto",
+ })
+ if err := nginx.CheckIngress(ing); err == nil {
+ t.Errorf("with an invalid path, ingress should be rejected")
+ }
+ })
+
Can we add a test such as:
t.Run("When invalid path is passed to Ingress", func(t *testing.T) {
nginx.store = fakeIngressStore{
ingresses: []*ingress.Ingress{},
}
nginx.command = testNginxTestCommand{
t: t,
err: nil,
}
ing.Spec.Rules[0].HTTP.Paths = append(ing.Spec.Rules[0].HTTP.Paths, networking.HTTPIngressPath{
Path: "/example(/|$)(.*)",
})
if err := nginx.CheckIngress(ing); err != nil {
t.Errorf("ingress should not be rejecting valid paths")
}
})
—
Reply to this email directly, view it on GitHub
<#9465 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABGZVWVK75WYRVPIN6SV35LWSFP57ANCNFSM6AAAAAATMPTZMA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
/close |
@rikatz: Closed this PR. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What this PR does / why we need it:
I forgot to add the "optional" (?) control char on regex validation, and enable the regex path when rewrite annotation is being used
Types of changes
Which issue/s this PR fixes
Fixes #9464
How Has This Been Tested?
Unit test based on user report
Checklist:
Does my pull request need a release note?
Any user-visible or operator-visible change qualifies for a release note. This could be a:
No release notes are required for changes to the following:
For more tips on writing good release notes, check out the Release Notes Handbook