Bump addressable from 2.9.1 to 2.10.0
Merged
DE
9h ago+2+2+0123456789-2-2-0123456789
Bumps addressable from 2.9.1 to 2.10.0.
Changelog
Sourced from addressable's changelog.
Addressable 2.10.0
Breaking changes
- Ruby 3.2 and earlier and JRuby 9.4 are no longer supported, and loading Addressable on them gives a deprecation warning when deprecation warnings are turned on, as with
-W:deprecated(#706)Addressable::URI::RULE_2A,RULE_2B_2C,RULE_2DandRULE_PREFIXED_PARENT, deprecated in 2.9.1, are removed (#669)Addressable::URIsetters,.newand#mergeraise forfalseinstead of treating it asnil(#667)Addressable::URI#port=and.newraiseInvalidURIErrorfor a port with a line break, such as"8080\nx"(#663)Addressable::URIsetters,.newand.parseraiseInvalidURIErrorfor a port above 65535 in a URI whose scheme has a default port, such ashttp://example.com:70000/, and for a port above the largest integer Ruby stores without a bignum, 2**62 - 1 on 64-bit platforms, in any URI (#711)Addressable::URI#origin=raisesInvalidURIErrorfor a string with a path, query or fragment, which it dropped, and for one with userinfo that has a colon, from which it took the host:https://user:pass@example.comraises instead of setting the host touser(#616, [GHSA-cwmp-x65r-27fv])Addressable::URI.parse,.newand the host setters raiseInvalidURIErrorfor brackets in a host that don't enclose an IPv6 address or IPvFuture literal, such ashttp://[127.0.0.1]/orhttp://example[.]com/, which they accepted ([GHSA-c7j3-jq7p-v3pr])Addressable::URI#host=,#authority=,.newand.parseraiseInvalidURIErrorfor a colon in a host outside the brackets of an IP literal, such asexample.com:8080orhttp://a:b:80/, which they accepted ([GHSA-w5p3-7836-69vh])Addressable::URI#user=,#password=,#userinfo=,#authority=,.newand.parseraiseInvalidURIErrorfor/,?,#,[,]or\in the user or password, or:in the user, which they accepted:uri.password = "#secret"raises, and a password with these characters has to be pct-encoded first ([GHSA-qrq6-rcpx-pmm6])- The strings a frozen
Addressable::URIholds are frozen, so changing one, as inuri.host << "x", raisesFrozenError(#668)Addressable::Template#expand,#partial_expand,#match,#extractand#to_regexpraiseInvalidTemplateErrorfor a template that doesn't match the RFC 6570 grammar, which expansion kept as text and matching read as literal text (#660, #693, #697)Addressable::Templatereads a prefix modifier outside 1 to 9999 or with a leading zero, such as{var:0},{var:05}or{var:10000}, as malformed:#expand,#partial_expand,#match,#extractand#to_regexpraiseInvalidTemplateErrorwhere they used to expand or match it, and#variablesignores the expression (#618, #693, #697)Addressable::Templatereads the operators RFC 6570 reserves,=,,,!,@and|, as malformed:#expand,#partial_expand,#match,#extractand#to_regexpraiseInvalidTemplateOperatorErrorwhere expansion used to treat{!var}like{var}, and#variablesignores the expression (#660, #693, #697)Addressable::Template#expandand#partial_expandraiseInvalidTemplateValueErrorfor a prefix modifier on a list or associative array (#660)- With the native backend,
Addressable::IDNA.punycode_encodeand.punycode_decoderaiseIDN::Punycode::PunycodeErrorfor a string with a NUL, where they converted only the text before it:punycode_encode("a\u0000b")gave"a-"([GHSA-mrrj-5mhw-rcf2])- The pure-Ruby
Addressable::IDNA.to_asciiraisesAddressable::IDNA::InvalidLabelfor a label that breaks the bidi rule of RFC 3454, such asexampleא, where it returned an A-label, asidn-rubyraisesIDN::Idna::IdnaError;Addressable::URI#normalizekeeps such a host pct-encoded:http://example%D7%90.test/gives itself, nothttp://xn--example-c5i.test/([GHSA-fccw-gx6q-mh6c])Addressable::Template#matchand#extractonly read a pair in a;,?or&expression as the pair of a variable that isn't exploded when the name is one of the expression's variables, and only as many times as the expression has the name, and otherwise don't match:{?q}on?admin=truegivesnil, not{"q" => nil, "admin" => "true"}([GHSA-q5vw-6v74-fg2g])- A processor's
matchpattern for a;,?or&variable that isn't exploded matches only the variable's value, as documented, soAddressable::Template#matchand#extractno longer match a pattern that includes the name, such aspage=\d+([GHSA-q5vw-6v74-fg2g])- The pure-Ruby
Addressable::IDNA.to_asciiraisesAddressable::IDNA::InvalidLabelfor a label made only of characters nameprep maps to nothing, such as U+200B ZERO WIDTH SPACE in"\u200B.example", where it returned an A-label, asidn-rubyraisesIDN::Idna::IdnaError(#703, #714)Changed output
Addressable::URI#normalize,#==,#===,.normalized_encode, the pure-RubyAddressable::IDNA.to_asciiandAddressable::Template#expand,#matchand#extractleave a run of more than 30 combining marks as it is instead of normalizing it, so they take linear time on any Ruby:efollowed by 31 U+0301 keeps theeand all 31 marks, notéand 30 ([GHSA-v6hg-69pc-4f3f])Addressable::URI.heuristic_parse("localhost:3000")giveshttp://localhost:3000, notlocalhost:3000with alocalhostscheme (#691)Addressable::URI#route_fromand#route_togive./, not../, for a route that would climb above the root (#648)Addressable::URI#query_valuesreads+as a space in query names too, and for uppercaseHTTPandHTTPS:?a+b=cgives{"a b" => "c"}, not{"a+b" => "c"}(#607)Addressable::URI#request_uripercent-encodes control characters and spaces:/a b?q=1gives/a%20b?q=1, not/a b?q=1([GHSA-qg8x-qm93-fw27])Addressable::URI#normalizeand.normalized_encodekeep U+037E GREEK QUESTION MARK pct-encoded instead of turning it into a;delimiter:/a%CD%BEbgives/a%CD%BEb, not/a;b(#712)Addressable::URI#normalizekeeps U+037E GREEK QUESTION MARK in a query:?a=%CD%BEgives?a=%CD%BE, not?a=%3B(#712)Addressable::Template#expandtreats an empty list or associative array as undefined and leaves outnilmembers:{?list}with[]gives nothing, not?list=(#611)Addressable::Template#expandkeeps pct-encoded triplets in reserved and fragment expansion:{+id}withadmin%2Fgivesadmin%2F, notadmin%252F(#656)Addressable::Template#expandgives;a=, not;a, for{;a}with[""](#689)Addressable::Template#expandgives;a;a=y, not;a=;a=y, for{;a*}with["", "y"](#688)Addressable::Template#expandpct-encodes non-ASCII literals:café/{var}givescaf%C3%A9/value, notcafé/value(#676)Addressable::Template#matchand#extractread a label value that contains.when the expression is set off by delimiters:/f{.ext}on/f.tar.gzgives{"ext" => "tar.gz"}, notnil, so code that tries several templates may pick a different one (#692)Addressable::Template#matchand#extractkeep the empty members of an exploded value:{/segments*}on/a/b/gives{"segments" => ["a", "b", ""]}, not{"segments" => ["a", "b"]}, and on/gives{"segments" => [""]}, not{"segments" => []}(#700)Addressable::Template#matchand#extractgive a variable that's repeated in an expression its first value:{+v1,v2,v1}ona,b,cgives{"v1" => "a", "v2" => "b"}, not{"v1" => "", "v2" => "a"}([GHSA-xj9m-f88p-5j38])Addressable::Template#matchand#extractgive a value that more than one variable of a/,.,+,#or default expression could take to the first of them, leaving a later variable undefined when nothing is left for it:{/a,b*}on/x/y/zgives{"a" => "x", "b" => ["y", "z"]}, not{"a" => "", "b" => ["x", "y", "z"]}(#715)- The pure-Ruby
Addressable::IDNA.to_asciiand.to_unicodekeep trailing empty labels, asidn-rubydoes:bücher.example.givesxn--bcher-kva.example., notxn--bcher-kva.example(#609)- The pure-Ruby
Addressable::IDNA.to_asciitreats U+3002 and U+FF61 as label separators, asidn-rubydoes:bücher。examplegivesxn--bcher-kva.example, notxn--bcherexample-dlb0569n([GHSA-x378-rg7m-2c49])Addressable::IDNA.to_unicodeandAddressable::URI#display_urileave an A-label as it is when it decodes to ASCII other than letters, digits and hyphens, or starts or ends with a hyphen:xn--mn,chen-n2agivesxn--mn,chen-n2a, notmün,chen(#716)
Addressable::URI
- Fix
#normalize,#normalized_host,#originand#==turning a pct-encoded or fullwidth colon in the host into the port delimiter:http://example.com%3A8080/normalizes to itself, nothttp://example.com:8080/([GHSA-w5p3-7836-69vh])- Fix
#normalizeand#normalized_hostdecoding a host twice:http://127%252E0%252E0%252E1/normalizes tohttp://127%252e0%252e0%252e1/, nothttp://127.0.0.1/([GHSA-w5p3-7836-69vh])
... (truncated)
Commits
a12466aRevving version and changelog for 2.10.0 (#725)a8091e5Skip the regexp timing specs on the macOS Intel runner (#724)3ac28a7Show the undefined variable in the README's extract example (#723)0b48642Credit GHSA-cwmp-x65r-27fv in the origin= changelog entry (#722)8025e4eSkip the template regexp timing specs on JRuby on Windows (#721)aede313Build committed template regexps faster (#719)0219401Decode pct-encoded bytes into a binary copy in URI.unencode (#720)153a1b7Fix CI on Ruby 2.3 to 2.6 and keep TruffleRuby within its time limit (#718)aed6f93Merge commit from forkde9e404Merge commit from fork- Additional commits viewable in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the Security Alerts page.
Summary by cubic
Updates addressable from 2.9.1 to 2.10.0 and public_suffix from 7.0.5 to 7.1.0 in Gemfile.lock. The new version includes breaking changes to URI validation and parsing, so verify existing URI handling and tests still pass.