Skip to content
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 validation for wildcard server names #6348

Merged
merged 1 commit into from
Oct 26, 2020
Merged

Conversation

aledbf
Copy link
Member

@aledbf aledbf commented Oct 19, 2020

What this PR does / why we need it:

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Which issue/s this PR fixes

From NGINX docs

The name “*.example.org” matches not only www.example.org but www.sub.example.org as well.

This is not valid. We should validate only one level is configured.

How Has This Been Tested?

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I've read the CONTRIBUTION guide
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 19, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aledbf

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 19, 2020
@codecov-io
Copy link

Codecov Report

Merging #6348 into master will increase coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6348      +/-   ##
==========================================
+ Coverage   55.81%   55.85%   +0.03%     
==========================================
  Files          89       89              
  Lines        6358     6363       +5     
==========================================
+ Hits         3549     3554       +5     
  Misses       2369     2369              
  Partials      440      440              
Impacted Files Coverage Δ
internal/ingress/controller/nginx.go 28.91% <ø> (ø)
internal/ingress/controller/template/template.go 77.27% <100.00%> (+0.16%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fb6a03f...10123b9. Read the comment docs.

@aledbf
Copy link
Member Author

aledbf commented Oct 19, 2020

/assign @ElvinEfendi

@aledbf
Copy link
Member Author

aledbf commented Oct 20, 2020

After this PR only two tests fail

Screenshot from 2020-10-19 22-05-41

https://aledbf.github.io/ingress-conformance-sample/index.html

@aledbf aledbf merged commit d74ea25 into kubernetes:master Oct 26, 2020
@aledbf aledbf deleted the wildcard branch October 26, 2020 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants