-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
fix(cli): Add IP address support to DENO_AUTH_TOKEN #22297
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bartlomieju
reviewed
Feb 6, 2024
cli/auth_tokens.rs
Outdated
Comment on lines
276
to
283
let candidates = [ | ||
"example.com", | ||
"www.example.com", | ||
"notexample.com", | ||
"www.notexample.com", | ||
"1.1.1.1", | ||
"[2001:db8:a::123]", | ||
]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add some tests with ports here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are tested with ports -- we add a port to each candidate below.
// Generate each candidate with and without a port
let candidates = candidates
.into_iter()
.flat_map(|c| [url(c), url_port(c)])
.collect::<Vec<_>>();
mmastrac
changed the title
feat(cli): Add IP address support to DENO_AUTH_TOKEN
fix(cli): Add IP address support to DENO_AUTH_TOKEN
Feb 6, 2024
bartlomieju
approved these changes
Feb 6, 2024
littledivy
pushed a commit
that referenced
this pull request
Feb 8, 2024
Auth tokens may be specified for one of the following: - `abc123@deno.land`: `deno.land`, `www.deno.land`, etc - `abc123@deno.land:8080`: `deno.land:8080`, `www.deno.land:8080`, etc - `abc123@1.1.1.1`: IP `1.1.1.1` only - `abc123@1.1.1.1:8080`: IP `1.1.1.1`, port 8080 only - `abc123@[ipv6]`: IPv6 `[ipv6]` only - `abc123@[ipv6]:8080`: IPv6 `[ipv6]`, port 8080 only Leading dots are ignored, so `.deno.dev` is equivalent to `deno.dev`.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Auth tokens may be specified for one of the following:
abc123@deno.land
:deno.land
,www.deno.land
, etcabc123@deno.land:8080
:deno.land:8080
,www.deno.land:8080
, etcabc123@1.1.1.1
: IP1.1.1.1
onlyabc123@1.1.1.1:8080
: IP1.1.1.1
, port 8080 onlyabc123@[ipv6]
: IPv6[ipv6]
onlyabc123@[ipv6]:8080
: IPv6[ipv6]
, port 8080 onlyLeading dots are ignored, so
.deno.dev
is equivalent todeno.dev
.