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

Tweak prepare_dns_san_entries for correctness, split out conversion of string to dns_label #736

Merged
merged 3 commits into from
Jan 24, 2019

Conversation

darobs
Copy link
Contributor

@darobs darobs commented Jan 23, 2019

prepare_dns_san_entries was allowing characters that are not A-Za-z0-9 (see line 168).

Plus, I need a function that just sanitizes a module name to a dns_label for my own nefarious purposes.

avranju
avranju previously approved these changes Jan 23, 2019
edgelet/edgelet-utils/src/lib.rs Outdated Show resolved Hide resolved
@darobs darobs closed this Jan 23, 2019
@darobs darobs reopened this Jan 23, 2019
@darobs darobs merged commit c34b8d8 into Azure:master Jan 24, 2019
@darobs darobs deleted the san_dns_tweaks branch January 24, 2019 15:31
myagley pushed a commit to myagley/iotedge that referenced this pull request Feb 4, 2019
myagley added a commit that referenced this pull request Feb 4, 2019
* Fix invalid DNS SAN entries (#795)

Changes here fix a situation where a edge device's host name that begins with number(s) [0-9] gets sanitized. For example host name "2019edgehost" is consumed as "edgehost". This has caused problems was observed when using VMs that begin with numbers since it appears to be permitted configuration contrary to RFC 1035.

The changes involve passing the configured host name as is into the SAN entry without any modifications. The module id DNS entry continues to be sanitized.

* Revert "Fix invalid DNS SAN entries (#795)"

This reverts commit a8148cc.

* prepare_dns_san_entries was allowing characters that are not A-Za-z0-9 (#736)

* Fix invalid DNS SAN entries (#795)

Changes here fix a situation where a edge device's host name that begins with number(s) [0-9] gets sanitized. For example host name "2019edgehost" is consumed as "edgehost". This has caused problems was observed when using VMs that begin with numbers since it appears to be permitted configuration contrary to RFC 1035.

The changes involve passing the configured host name as is into the SAN entry without any modifications. The module id DNS entry continues to be sanitized.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants