| Age | Commit message (Collapse) | Author |
|
Effectively reverts commit https://github.com/ruby/uri/commit/788274b180d6 and
https://github.com/ruby/uri/commit/0abac721d8fe.
EMAIL_REGEXP was mostly drawn from WHATWG HTML LS. This spec states that
it intentionally violates RFC 5322 to provide a practical regex for
validation.
> This requirement is a willful violation of RFC 5322, which defines a
> syntax for email addresses that is simultaneously too strict (before the
> "@" character), too vague (after the "@" character), and too lax
> (allowing comments, whitespace characters, and quoted strings in manners
> unfamiliar to most users) to be of practical use here.
The allowing of consecutive dot s(`a..a@`) and leading/trailing dots
(`.a@`, `a.@`) is not the only derivation from RFC 5322. If a truly RFC
5322-compliant regexp is needed, tt should be organized under a
different name, since too much departure from the original EMAIL_REGEXP
must be introduced.
https://github.com/ruby/uri/commit/c551d7020b
|
|
Currently, some methods' behavior(e.g. `URI.parse`) don't change
when switching a parser. This is because some methods use
`DEFAULT_PARSER`, but `parser=` doesn't change `DEFAULT_PARSER`.
This PR introduces a constant to keep a parser's instance and
change it when switching a parser. Also, change to use it in
methods.
https://github.com/ruby/uri/commit/aded210709
|
|
Fix CVE-2025-27221.
https://hackerone.com/reports/3221142
https://github.com/ruby/uri/commit/5cec76b9e8
|
|
https://github.com/ruby/uri/commit/fa49e5b8ae
|
|
https://github.com/ruby/uri/commit/be35e0b4d8
|
|
Fix the performance regression at #172 for valid emails.
``` yml
prelude: |
require 'uri/mailto'
n = 1000
re = URI::MailTo::EMAIL_REGEXP
benchmark:
n.t..t.: re.match?("n.t..t.@docomo.ne.jp")
example: re.match?("example@example.info")
```
| |released| 788274b| c5974f0| this|
|:--------|-------:|-------:|-------:|-------:|
|n.t..t. | 3.795M| 4.864M| 4.993M| 8.739M|
| | -| 1.28x| 1.32x| 2.30x|
|example | 3.911M| 3.740M| 2.838M| 3.880M|
| | 1.38x| 1.32x| -| 1.37x|
https://github.com/ruby/uri/commit/7363a134ac
|
|
Pointed out by John Hawthorn.
Fixes [Bug #20686]
https://github.com/ruby/uri/commit/c0cfa04a66
|
|
https://github.com/ruby/uri/commit/32335923bf
|
|
https://github.com/ruby/uri/commit/b1b5f9a476
|
|
local part instead of a character class
https://github.com/ruby/uri/commit/2d7d2d9988
|
|
contain leading or trailing dots
https://github.com/ruby/uri/commit/618e2bb640
|
|
(https://github.com/ruby/uri/pull/38)
https://github.com/ruby/uri/commit/0c2b6468fa
|
|
Use just `self` instead of `self.class`, in `URI::Generic.build`.
Since this is a class method, `self.class` is always `Class` even in
inherited sub classes, and does not have `#component` method.
https://github.com/ruby/uri/commit/6f44d3d40e
|
|
https://github.com/ruby/uri/commit/d79b3f5b94
|
|
Fix https://github.com/ruby/uri/pull/89
https://github.com/ruby/uri/commit/d543c0dafa
|
|
This reverts commit https://github.com/ruby/uri/commit/443ed0cf8540.
https://github.com/ruby/uri/commit/9e51838a04
|
|
https://github.com/ruby/uri/commit/443ed0cf85
|
|
* Added `Ractor::Port`
* `Ractor::Port#receive` (support multi-threads)
* `Rcator::Port#close`
* `Ractor::Port#closed?`
* Added some methods
* `Ractor#join`
* `Ractor#value`
* `Ractor#monitor`
* `Ractor#unmonitor`
* Removed some methods
* `Ractor#take`
* `Ractor.yield`
* Change the spec
* `Racotr.select`
You can wait for multiple sequences of messages with `Ractor::Port`.
```ruby
ports = 3.times.map{ Ractor::Port.new }
ports.map.with_index do |port, ri|
Ractor.new port,ri do |port, ri|
3.times{|i| port << "r#{ri}-#{i}"}
end
end
p ports.each{|port| pp 3.times.map{port.receive}}
```
In this example, we use 3 ports, and 3 Ractors send messages to them respectively.
We can receive a series of messages from each port.
You can use `Ractor#value` to get the last value of a Ractor's block:
```ruby
result = Ractor.new do
heavy_task()
end.value
```
You can wait for the termination of a Ractor with `Ractor#join` like this:
```ruby
Ractor.new do
some_task()
end.join
```
`#value` and `#join` are similar to `Thread#value` and `Thread#join`.
To implement `#join`, `Ractor#monitor` (and `Ractor#unmonitor`) is introduced.
This commit changes `Ractor.select()` method.
It now only accepts ports or Ractors, and returns when a port receives a message or a Ractor terminates.
We removes `Ractor.yield` and `Ractor#take` because:
* `Ractor::Port` supports most of similar use cases in a simpler manner.
* Removing them significantly simplifies the code.
We also change the internal thread scheduler code (thread_pthread.c):
* During barrier synchronization, we keep the `ractor_sched` lock to avoid deadlocks.
This lock is released by `rb_ractor_sched_barrier_end()`
which is called at the end of operations that require the barrier.
* fix potential deadlock issues by checking interrupts just before setting UBF.
https://bugs.ruby-lang.org/issues/21262
Notes:
Merged: https://github.com/ruby/ruby/pull/13445
|
|
https://hackerone.com/reports/2957667
https://github.com/ruby/uri/commit/2789182478
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
|
|
https://github.com/ruby/uri/commit/3675494839
|
|
(https://github.com/ruby/uri/pull/140)
A follow-up to https://github.com/ruby/uri/commit/bd2e4be9d0fa
Also, leave a comment that the use of `URI::REGEXP` is intentional
https://github.com/ruby/uri/commit/bdf765e44a
|
|
EnvUtil.suppress_warning.
https://github.com/ruby/uri/commit/bd2e4be9d0
|
|
(https://github.com/ruby/uri/pull/138)"
This reverts commit https://github.com/ruby/uri/commit/c00726a20a00.
https://github.com/ruby/uri/commit/22f5a7a790
|
|
(https://github.com/ruby/uri/pull/138)
https://github.com/ruby/uri/commit/c00726a20a
|
|
URI::RFC2396_REGEXP::PATTERN
https://github.com/ruby/uri/commit/60a8bc1575
|
|
https://github.com/ruby/uri/commit/ee9a38701a
|
|
Fixed https://github.com/ruby/uri/issues/125
https://github.com/ruby/uri/commit/1f3d3df02a
|
|
https://github.com/ruby/uri/commit/898b889811
|
|
(https://github.com/ruby/uri/pull/113)
* Fallback missing constants with RFC3986_PARSER
* raise missing constant
* Update test/uri/test_common.rb
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
* Update lib/uri/common.rb
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
* Update lib/uri/common.rb
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
---------
https://github.com/ruby/uri/commit/c2fdec079a
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
|
|
https://github.com/ruby/uri/commit/823697edb4
|
|
using RFC3986_PARSER
https://github.com/ruby/uri/commit/6f616d97fc
|
|
https://github.com/ruby/uri/commit/2e0f73f05e
|
|
https://github.com/ruby/uri/commit/0ab9abbf08
|
|
Otherwise, the path could be considered part of the host or port.
This is better than modifying the path to make it absolute when
a host or port is set. We could also raise for invalid paths
when a host or port is set using check_path, but that results
in weird errors, and won't catch issues (such as ftp allowing a
relative path).
Fixes [Bug #19916]
https://github.com/ruby/uri/commit/ac32aa005b
|
|
https://hackerone.com/reports/1958260
https://github.com/ruby/uri/commit/9d7bcef1e6
|
|
https://hackerone.com/reports/1958260
https://github.com/ruby/uri/commit/9010ee2536
|
|
In relative referece, host part can be ommitted but can not be empty.
https://github.com/ruby/uri/commit/2980f0ba02
|
|
https://github.com/ruby/uri/commit/8e38592241
|
|
https://github.com/ruby/uri/commit/aaa22a2443
|
|
https://github.com/ruby/uri/commit/cfbeade935
|
|
|
|
https://hackerone.com/reports/1444501
https://github.com/ruby/uri/commit/54abaa739b
|
|
https://github.com/ruby/uri/commit/ffbab83de6
|
|
|
|
given scheme
* Also add docs and mention current limitations.
* For reference, https://stackoverflow.com/a/3641782/388803 mentions the
valid characters in schemes.
https://github.com/ruby/uri/commit/4346daac75
|
|
URI::Generic#{user,password} return the encoded values, which are
not that useful if you want to do authentication with them.
Automatic decoding by default would break backwards compatibility.
Optional automatic decoding via a keyword to URI.parse would
require threading the option through at least 3 other methods, and
would make semantics confusing (user= takes encoded or unencoded
password?) or require more work. Thus, adding this as a separate
method seemed the simplest approach.
Unfortunately, URI lacks a method for correct decoding. Unlike in
www form components, + in earlier parts of the URI such as the
userinfo section is treated verbatim and not as an encoded space.
Add URI.#{en,de}code_uri_component methods, which are almost the
same as URI.#{en,de}code_www_form_component, but without the
special SP => + handling.
Implements [Feature #9045]
https://github.com/ruby/uri/commit/16cfc4e92f
|
|
|
|
There was a file for WSS so I added one line of `require_relative`
to make it work.
Now `URI.parse('wss://example.com')` returns `URI::WS`.
https://github.com/ruby/uri/commit/ff8a103564
|
|
`URI.parse('https://a.b.c/')` needs 'uri/https'.
|
|
(https://github.com/ruby/uri/pull/30)
https://github.com/ruby/uri/commit/bf13946c32
Co-authored-by: Samuel Williams <samuel.williams@oriontransfer.co.nz>
|