rack-sanitizer 2.0.2 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +2 -1
- data/.gitignore +0 -1
- data/.ruby-version +1 -0
- data/Gemfile.lock +26 -0
- data/lib/rack/sanitizer.rb +3 -1
- data/rack-sanitizer.gemspec +1 -1
- metadata +8 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63f52a6acb6c9e0d966c5adf830bff54689e56eb8cea9c91a0fe7cc05a6786b4
|
4
|
+
data.tar.gz: 54f2453179ad918e01b70dc949d1c8685e77f74311fb14b1465b76c1a3ce6130
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1139b845eea460cdccb33e34acaa750b755a4a55729bc593a54650c0052f1a041e3d20987686abec16b2d2cf492128e0d0d9e9451756c54be97ee70eb07b032
|
7
|
+
data.tar.gz: bfe792b1c548442f0272ac47d975779a4f43b1ba958614bf5df4674f61cc9284e3ba6ed701629b2696aa9fd0b62b2240f3c5e0c8accba1ea8dca543bcd0c6d0e
|
data/.github/workflows/ci.yml
CHANGED
@@ -10,7 +10,7 @@ jobs:
|
|
10
10
|
strategy:
|
11
11
|
fail-fast: false
|
12
12
|
matrix:
|
13
|
-
ruby: ["2.5", "2.6", "2.7", "3.0", "3.1", "3.2", ruby-head, jruby-9.2, jruby-9.3, jruby-head]
|
13
|
+
ruby: ["2.5", "2.6", "2.7", "3.0", "3.1", "3.2", "3.3", ruby-head, jruby-9.2, jruby-9.3, jruby-head]
|
14
14
|
|
15
15
|
steps:
|
16
16
|
- uses: actions/checkout@v4
|
@@ -19,5 +19,6 @@ jobs:
|
|
19
19
|
with:
|
20
20
|
bundler-cache: true # 'bundle install' and cache gems
|
21
21
|
ruby-version: ${{ matrix.ruby }}
|
22
|
+
bundler: latest
|
22
23
|
- name: Run tests
|
23
24
|
run: bundle exec rake
|
data/.gitignore
CHANGED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
3.3.0
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
rack-sanitizer (2.0.3)
|
5
|
+
rack (>= 1.0, < 4.0)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
bacon (1.2.0)
|
11
|
+
bacon-colored_output (1.1.1)
|
12
|
+
bacon
|
13
|
+
rack (3.0.10)
|
14
|
+
rake (13.1.0)
|
15
|
+
|
16
|
+
PLATFORMS
|
17
|
+
ruby
|
18
|
+
|
19
|
+
DEPENDENCIES
|
20
|
+
bacon
|
21
|
+
bacon-colored_output
|
22
|
+
rack-sanitizer!
|
23
|
+
rake
|
24
|
+
|
25
|
+
BUNDLED WITH
|
26
|
+
2.5.7
|
data/lib/rack/sanitizer.rb
CHANGED
@@ -180,6 +180,8 @@ module Rack
|
|
180
180
|
end
|
181
181
|
end
|
182
182
|
|
183
|
+
URI_PARSER = defined?(URI::RFC2396_PARSER) ? URI::RFC2396_PARSER : URI::RFC2396_Parser.new
|
184
|
+
|
183
185
|
# Performs the reverse function of `unescape_unreserved`. Unlike
|
184
186
|
# the previous function, we can reuse the logic in URI#encode
|
185
187
|
def escape_unreserved(input)
|
@@ -189,7 +191,7 @@ module Rack
|
|
189
191
|
# `unescape_unreserved` invocation.
|
190
192
|
#
|
191
193
|
# See also URI::REGEXP::PATTERN::{UNRESERVED,RESERVED}.
|
192
|
-
|
194
|
+
URI_PARSER.escape(input, /[^\-_.!~*'()a-zA-Z\d;\/?:@&=+$,\[\]%]/)
|
193
195
|
end
|
194
196
|
|
195
197
|
def sanitize_string(input)
|
data/rack-sanitizer.gemspec
CHANGED
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-sanitizer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jean Boussier
|
8
8
|
- whitequark
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-
|
12
|
+
date: 2024-09-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rack
|
@@ -86,7 +86,9 @@ files:
|
|
86
86
|
- ".github/workflows/ci.yml"
|
87
87
|
- ".github/workflows/cla.yml"
|
88
88
|
- ".gitignore"
|
89
|
+
- ".ruby-version"
|
89
90
|
- Gemfile
|
91
|
+
- Gemfile.lock
|
90
92
|
- LICENSE.txt
|
91
93
|
- README.md
|
92
94
|
- Rakefile
|
@@ -98,7 +100,7 @@ licenses:
|
|
98
100
|
- MIT
|
99
101
|
metadata:
|
100
102
|
allowed_push_host: https://rubygems.org/
|
101
|
-
post_install_message:
|
103
|
+
post_install_message:
|
102
104
|
rdoc_options: []
|
103
105
|
require_paths:
|
104
106
|
- lib
|
@@ -113,8 +115,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
113
115
|
- !ruby/object:Gem::Version
|
114
116
|
version: '0'
|
115
117
|
requirements: []
|
116
|
-
rubygems_version: 3.5.
|
117
|
-
signing_key:
|
118
|
+
rubygems_version: 3.5.18
|
119
|
+
signing_key:
|
118
120
|
specification_version: 4
|
119
121
|
summary: It is a mordernized and optimized fork of rack-utf8_sanitizer
|
120
122
|
test_files:
|