From 19b19533a42ffed2e4d6802aac916ee43f812219 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 17 Jun 2026 16:03:36 +0000 Subject: [PATCH 1/2] Bump rack-session from 2.1.1 to 2.1.2 Bumps [rack-session](https://github.com/rack/rack-session) from 2.1.1 to 2.1.2. - [Release notes](https://github.com/rack/rack-session/releases) - [Changelog](https://github.com/rack/rack-session/blob/main/releases.md) - [Commits](https://github.com/rack/rack-session/compare/v2.1.1...v2.1.2) --- updated-dependencies: - dependency-name: rack-session dependency-version: 2.1.2 dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 99276bd..ec2d97e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -114,8 +114,8 @@ GEM date stringio racc (1.8.1) - rack (3.2.5) - rack-session (2.1.1) + rack (3.2.6) + rack-session (2.1.2) base64 (>= 0.1.0) rack (>= 3.0.0) rack-test (2.2.0) From ff62e0d0083834eeeb86377ef49594066cffced9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 17 Jun 2026 16:04:11 +0000 Subject: [PATCH 2/2] Regenerate gem RBIs [dependabot skip] --- ...ssion@2.1.1.rbi => rack-session@2.1.2.rbi} | 180 ++++++++--- .../gems/{rack@3.2.5.rbi => rack@3.2.6.rbi} | 292 ++++++++++-------- 2 files changed, 309 insertions(+), 163 deletions(-) rename sorbet/rbi/gems/{rack-session@2.1.1.rbi => rack-session@2.1.2.rbi} (83%) rename sorbet/rbi/gems/{rack@3.2.5.rbi => rack@3.2.6.rbi} (95%) diff --git a/sorbet/rbi/gems/rack-session@2.1.1.rbi b/sorbet/rbi/gems/rack-session@2.1.2.rbi similarity index 83% rename from sorbet/rbi/gems/rack-session@2.1.1.rbi rename to sorbet/rbi/gems/rack-session@2.1.2.rbi index bc73568..47b12ea 100644 --- a/sorbet/rbi/gems/rack-session@2.1.1.rbi +++ b/sorbet/rbi/gems/rack-session@2.1.2.rbi @@ -423,10 +423,10 @@ class Rack::Session::Cookie < ::Rack::Session::Abstract::PersistedSecure private - # pkg:gem/rack-session#lib/rack/session/cookie.rb:277 + # pkg:gem/rack-session#lib/rack/session/cookie.rb:279 def delete_session(req, session_id, options); end - # pkg:gem/rack-session#lib/rack/session/cookie.rb:292 + # pkg:gem/rack-session#lib/rack/session/cookie.rb:294 def encode_session_data(session); end # pkg:gem/rack-session#lib/rack/session/cookie.rb:209 @@ -435,13 +435,13 @@ class Rack::Session::Cookie < ::Rack::Session::Abstract::PersistedSecure # pkg:gem/rack-session#lib/rack/session/cookie.rb:203 def find_session(req, sid); end - # pkg:gem/rack-session#lib/rack/session/cookie.rb:282 + # pkg:gem/rack-session#lib/rack/session/cookie.rb:284 def legacy_digest_match?(data, digest); end - # pkg:gem/rack-session#lib/rack/session/cookie.rb:288 + # pkg:gem/rack-session#lib/rack/session/cookie.rb:290 def legacy_generate_hmac(data); end - # pkg:gem/rack-session#lib/rack/session/cookie.rb:250 + # pkg:gem/rack-session#lib/rack/session/cookie.rb:252 def persistent_session_id!(data, sid = T.unsafe(nil)); end # Were consider "secure" if: @@ -451,13 +451,13 @@ class Rack::Session::Cookie < ::Rack::Session::Abstract::PersistedSecure # * Customer :coder is used, with :let_coder_handle_secure_encoding # set to true # - # pkg:gem/rack-session#lib/rack/session/cookie.rb:306 + # pkg:gem/rack-session#lib/rack/session/cookie.rb:308 def secure?(options); end # pkg:gem/rack-session#lib/rack/session/cookie.rb:213 def unpacked_cookie_data(request); end - # pkg:gem/rack-session#lib/rack/session/cookie.rb:265 + # pkg:gem/rack-session#lib/rack/session/cookie.rb:267 def write_session(req, session_id, session, options); end end @@ -524,17 +524,72 @@ class Rack::Session::Cookie::Marshal def encode(str); end end -# pkg:gem/rack-session#lib/rack/session/cookie.rb:256 +# pkg:gem/rack-session#lib/rack/session/cookie.rb:258 class Rack::Session::Cookie::SessionId - # pkg:gem/rack-session#lib/rack/session/cookie.rb:259 + # pkg:gem/rack-session#lib/rack/session/cookie.rb:261 def initialize(session_id, cookie_value); end - # pkg:gem/rack-session#lib/rack/session/cookie.rb:257 + # pkg:gem/rack-session#lib/rack/session/cookie.rb:259 def cookie_value; end end # pkg:gem/rack-session#lib/rack/session/encryptor.rb:16 class Rack::Session::Encryptor + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:347 + def initialize(secret, opts = T.unsafe(nil)); end + + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:362 + def decrypt(base64_data); end + + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:376 + def encrypt(message); end + + private + + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:392 + def guess_decryptor(base64_data); end + + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:390 + def v1; end + + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:390 + def v2; end +end + +# pkg:gem/rack-session#lib/rack/session/encryptor.rb:17 +class Rack::Session::Encryptor::Error < ::StandardError; end + +# pkg:gem/rack-session#lib/rack/session/encryptor.rb:23 +class Rack::Session::Encryptor::InvalidMessage < ::Rack::Session::Encryptor::Error; end + +# pkg:gem/rack-session#lib/rack/session/encryptor.rb:20 +class Rack::Session::Encryptor::InvalidSignature < ::Rack::Session::Encryptor::Error; end + +# pkg:gem/rack-session#lib/rack/session/encryptor.rb:26 +module Rack::Session::Encryptor::Serializable + private + + # Return the deserialized message. The first 2 bytes will be read as the + # amount of padding. + # + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:45 + def deserialized_message(data); end + + # Returns a serialized payload of the message. If a :pad_size is supplied, + # the message will be padded. The first 2 bytes of the returned string will + # indicating the amount of padding. + # + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:32 + def serialize_payload(message); end + + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:54 + def serializer; end +end + +# pkg:gem/rack-session#lib/rack/session/encryptor.rb:59 +class Rack::Session::Encryptor::V1 + include ::Rack::Session::Encryptor::Serializable + # The secret String must be at least 64 bytes in size. The first 32 bytes # will be used for the encryption cipher key. The remainder will be used # for an HMAC key. @@ -557,66 +612,107 @@ class Rack::Session::Encryptor # urlsafe_encode64(version + random_data + IV + encrypted data + HMAC) # # Where: - # * version - 1 byte and is currently always 0x01 + # * version - 1 byte with value 0x01 # * random_data - 32 bytes used for generating the per-message secret # * IV - 16 bytes random initialization vector # * HMAC - 32 bytes HMAC-SHA-256 of all preceding data, plus the purpose # value # - # pkg:gem/rack-session#lib/rack/session/encryptor.rb:53 + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:89 def initialize(secret, opts = T.unsafe(nil)); end - # pkg:gem/rack-session#lib/rack/session/encryptor.rb:77 + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:113 def decrypt(base64_data); end - # pkg:gem/rack-session#lib/rack/session/encryptor.rb:102 + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:138 def encrypt(message); end private - # pkg:gem/rack-session#lib/rack/session/encryptor.rb:139 + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:175 def cipher_secret_from_message_secret(message_secret); end - # pkg:gem/rack-session#lib/rack/session/encryptor.rb:151 + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:183 def compute_signature(data); end - # Return the deserialized message. The first 2 bytes will be read as the - # amount of padding. - # - # pkg:gem/rack-session#lib/rack/session/encryptor.rb:182 - def deserialized_message(data); end - - # pkg:gem/rack-session#lib/rack/session/encryptor.rb:129 + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:165 def new_cipher; end - # pkg:gem/rack-session#lib/rack/session/encryptor.rb:133 - def new_message_and_cipher_secret; end - - # Returns a serialized payload of the message. If a :pad_size is supplied, - # the message will be padded. The first 2 bytes of the returned string will - # indicating the amount of padding. - # # pkg:gem/rack-session#lib/rack/session/encryptor.rb:169 - def serialize_payload(message); end - - # pkg:gem/rack-session#lib/rack/session/encryptor.rb:147 - def serializer; end + def new_message_and_cipher_secret; end - # pkg:gem/rack-session#lib/rack/session/encryptor.rb:143 + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:179 def set_cipher_key(cipher, key); end - # pkg:gem/rack-session#lib/rack/session/encryptor.rb:158 + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:190 def verify_authenticity!(data, signature); end end -# pkg:gem/rack-session#lib/rack/session/encryptor.rb:17 -class Rack::Session::Encryptor::Error < ::StandardError; end +# pkg:gem/rack-session#lib/rack/session/encryptor.rb:199 +class Rack::Session::Encryptor::V2 + include ::Rack::Session::Encryptor::Serializable -# pkg:gem/rack-session#lib/rack/session/encryptor.rb:23 -class Rack::Session::Encryptor::InvalidMessage < ::Rack::Session::Encryptor::Error; end + # The secret String must be at least 32 bytes in size. + # + # Options may include: + # * :pad_size + # Pad encrypted message data, to a multiple of this many bytes + # (default: 32). This can be between 2-4096 bytes, or +nil+ to disable + # padding. + # * :purpose + # Limit messages to a specific purpose. This can be viewed as a + # security enhancement to prevent message reuse from different contexts + # if keys are reused. + # + # Cryptography and Output Format: + # + # strict_encode64(version + salt + IV + authentication tag + ciphertext) + # + # Where: + # * version - 1 byte with value 0x02 + # * salt - 32 bytes used for generating the per-message secret + # * IV - 12 bytes random initialization vector + # * authentication tag - 16 bytes authentication tag generated by the GCM mode, covering version and salt + # + # Considerations about V2: + # + # 1) It uses non URL-safe Base64 encoding as it's faster than its + # URL-safe counterpart - as of Ruby 3.2, Base64.urlsafe_encode64 is + # roughly equivalent to + # + # Base64.strict_encode64(data).tr("-_", "+/") + # + # - and cookie values don't need to be URL-safe. + # + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:233 + def initialize(secret, opts = T.unsafe(nil)); end -# pkg:gem/rack-session#lib/rack/session/encryptor.rb:20 -class Rack::Session::Encryptor::InvalidSignature < ::Rack::Session::Encryptor::Error; end + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:257 + def decrypt(base64_data); end + + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:285 + def encrypt(message); end + + private + + # JRuby's OpenSSL implementation doesn't currently support passing + # an argument to #auth_tag. Here we work around that. + # + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:341 + def auth_tag_from(cipher); end + + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:323 + def message_secret_from_salt(salt); end + + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:313 + def new_cipher; end + + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:317 + def new_salt_and_message_secret; end + + # pkg:gem/rack-session#lib/rack/session/encryptor.rb:327 + def set_cipher_key(cipher, key); end +end # pkg:gem/rack-session#lib/rack/session/constants.rb:9 Rack::Session::RACK_SESSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/rack@3.2.5.rbi b/sorbet/rbi/gems/rack@3.2.6.rbi similarity index 95% rename from sorbet/rbi/gems/rack@3.2.5.rbi rename to sorbet/rbi/gems/rack@3.2.6.rbi index 44c25af..7236e08 100644 --- a/sorbet/rbi/gems/rack@3.2.5.rbi +++ b/sorbet/rbi/gems/rack@3.2.6.rbi @@ -1473,28 +1473,28 @@ class Rack::Lint::Wrapper::StreamWrapper def initialize(stream); end # pkg:gem/rack#lib/rack/lint.rb:945 - def <<(*_arg0, **_arg1, &_arg2); end + def <<(*args, **_arg1, &block); end # pkg:gem/rack#lib/rack/lint.rb:945 - def close(*_arg0, **_arg1, &_arg2); end + def close(*args, **_arg1, &block); end # pkg:gem/rack#lib/rack/lint.rb:945 - def close_read(*_arg0, **_arg1, &_arg2); end + def close_read(*args, **_arg1, &block); end # pkg:gem/rack#lib/rack/lint.rb:945 - def close_write(*_arg0, **_arg1, &_arg2); end + def close_write(*args, **_arg1, &block); end # pkg:gem/rack#lib/rack/lint.rb:945 - def closed?(*_arg0, **_arg1, &_arg2); end + def closed?(*args, **_arg1, &block); end # pkg:gem/rack#lib/rack/lint.rb:945 - def flush(*_arg0, **_arg1, &_arg2); end + def flush(*args, **_arg1, &block); end # pkg:gem/rack#lib/rack/lint.rb:945 - def read(*_arg0, **_arg1, &_arg2); end + def read(*args, **_arg1, &block); end # pkg:gem/rack#lib/rack/lint.rb:945 - def write(*_arg0, **_arg1, &_arg2); end + def write(*args, **_arg1, &block); end end # The semantics of these +IO+ methods must be a best effort match to those of a normal Ruby +IO+ or +Socket+ object, using standard arguments and raising standard exceptions. Servers may simply pass on real +IO+ objects to the Streaming Body. In some cases (e.g. when using transfer-encoding or HTTP/2+), the server may need to provide a wrapper that implements the required methods, in order to provide the correct semantics. @@ -2001,16 +2001,16 @@ end # # pkg:gem/rack#lib/rack/multipart/parser.rb:53 class Rack::Multipart::Parser - # pkg:gem/rack#lib/rack/multipart/parser.rb:235 + # pkg:gem/rack#lib/rack/multipart/parser.rb:254 def initialize(boundary, tempfile, bufsize, query_parser); end - # pkg:gem/rack#lib/rack/multipart/parser.rb:254 + # pkg:gem/rack#lib/rack/multipart/parser.rb:275 def parse(io); end - # pkg:gem/rack#lib/rack/multipart/parser.rb:277 + # pkg:gem/rack#lib/rack/multipart/parser.rb:299 def result; end - # pkg:gem/rack#lib/rack/multipart/parser.rb:233 + # pkg:gem/rack#lib/rack/multipart/parser.rb:252 def state; end private @@ -2020,23 +2020,23 @@ class Rack::Multipart::Parser # end of the boundary. If we don't find the start or end of the # boundary, clear the buffer and return nil. # - # pkg:gem/rack#lib/rack/multipart/parser.rb:493 + # pkg:gem/rack#lib/rack/multipart/parser.rb:534 def consume_boundary; end # Return the related Encoding object. However, because # enc is submitted by the user, it may be invalid, so # use a binary encoding in that case. # - # pkg:gem/rack#lib/rack/multipart/parser.rb:548 + # pkg:gem/rack#lib/rack/multipart/parser.rb:589 def find_encoding(enc); end - # pkg:gem/rack#lib/rack/multipart/parser.rb:330 + # pkg:gem/rack#lib/rack/multipart/parser.rb:358 def handle_consume_token; end - # pkg:gem/rack#lib/rack/multipart/parser.rb:563 + # pkg:gem/rack#lib/rack/multipart/parser.rb:604 def handle_dummy_encoding(name, body); end - # pkg:gem/rack#lib/rack/multipart/parser.rb:573 + # pkg:gem/rack#lib/rack/multipart/parser.rb:614 def handle_empty_content!(content); end # This handles the initial parser state. We read until we find the starting @@ -2047,32 +2047,32 @@ class Rack::Multipart::Parser # boundary. The client would have to deliberately craft a response # with the opening boundary beyond the buffer size for that to happen. # - # pkg:gem/rack#lib/rack/multipart/parser.rb:303 + # pkg:gem/rack#lib/rack/multipart/parser.rb:331 def handle_fast_forward; end - # pkg:gem/rack#lib/rack/multipart/parser.rb:460 + # pkg:gem/rack#lib/rack/multipart/parser.rb:501 def handle_mime_body; end - # pkg:gem/rack#lib/rack/multipart/parser.rb:342 + # pkg:gem/rack#lib/rack/multipart/parser.rb:373 def handle_mime_head; end - # pkg:gem/rack#lib/rack/multipart/parser.rb:502 + # pkg:gem/rack#lib/rack/multipart/parser.rb:543 def normalize_filename(filename); end - # pkg:gem/rack#lib/rack/multipart/parser.rb:290 + # pkg:gem/rack#lib/rack/multipart/parser.rb:312 def read_data(io, outbuf); end - # pkg:gem/rack#lib/rack/multipart/parser.rb:515 + # pkg:gem/rack#lib/rack/multipart/parser.rb:556 def tag_multipart_encoding(filename, content_type, name, body); end - # pkg:gem/rack#lib/rack/multipart/parser.rb:482 + # pkg:gem/rack#lib/rack/multipart/parser.rb:523 def update_retained_size(size); end class << self - # pkg:gem/rack#lib/rack/multipart/parser.rb:122 + # pkg:gem/rack#lib/rack/multipart/parser.rb:137 def parse(io, content_length, content_type, tmpfile, bufsize, qp); end - # pkg:gem/rack#lib/rack/multipart/parser.rb:115 + # pkg:gem/rack#lib/rack/multipart/parser.rb:122 def parse_boundary(content_type); end end end @@ -2086,112 +2086,121 @@ Rack::Multipart::Parser::BUFFERED_UPLOAD_BYTESIZE_LIMIT = T.let(T.unsafe(nil), I # pkg:gem/rack#lib/rack/multipart/parser.rb:54 Rack::Multipart::Parser::BUFSIZE = T.let(T.unsafe(nil), Integer) -# pkg:gem/rack#lib/rack/multipart/parser.rb:83 +# pkg:gem/rack#lib/rack/multipart/parser.rb:90 class Rack::Multipart::Parser::BoundedIO - # pkg:gem/rack#lib/rack/multipart/parser.rb:84 + # pkg:gem/rack#lib/rack/multipart/parser.rb:91 def initialize(io, content_length); end - # pkg:gem/rack#lib/rack/multipart/parser.rb:90 + # pkg:gem/rack#lib/rack/multipart/parser.rb:97 def read(size, outbuf = T.unsafe(nil)); end end -# pkg:gem/rack#lib/rack/multipart/parser.rb:512 +# pkg:gem/rack#lib/rack/multipart/parser.rb:553 Rack::Multipart::Parser::CHARSET = T.let(T.unsafe(nil), String) -# pkg:gem/rack#lib/rack/multipart/parser.rb:341 +# pkg:gem/rack#lib/rack/multipart/parser.rb:369 Rack::Multipart::Parser::CONTENT_DISPOSITION_MAX_BYTES = T.let(T.unsafe(nil), Integer) -# pkg:gem/rack#lib/rack/multipart/parser.rb:340 +# pkg:gem/rack#lib/rack/multipart/parser.rb:368 Rack::Multipart::Parser::CONTENT_DISPOSITION_MAX_PARAMS = T.let(T.unsafe(nil), Integer) -# pkg:gem/rack#lib/rack/multipart/parser.rb:142 +# pkg:gem/rack#lib/rack/multipart/parser.rb:87 +Rack::Multipart::Parser::CONTENT_DISPOSITION_QUOTED_ESCAPES_LIMIT = T.let(T.unsafe(nil), Integer) + +# pkg:gem/rack#lib/rack/multipart/parser.rb:161 class Rack::Multipart::Parser::Collector include ::Enumerable - # pkg:gem/rack#lib/rack/multipart/parser.rb:178 + # pkg:gem/rack#lib/rack/multipart/parser.rb:197 def initialize(tempfile); end - # pkg:gem/rack#lib/rack/multipart/parser.rb:184 + # pkg:gem/rack#lib/rack/multipart/parser.rb:203 def each; end - # pkg:gem/rack#lib/rack/multipart/parser.rb:204 + # pkg:gem/rack#lib/rack/multipart/parser.rb:223 def on_mime_body(mime_index, content); end - # pkg:gem/rack#lib/rack/multipart/parser.rb:208 + # pkg:gem/rack#lib/rack/multipart/parser.rb:227 def on_mime_finish(mime_index); end - # pkg:gem/rack#lib/rack/multipart/parser.rb:188 + # pkg:gem/rack#lib/rack/multipart/parser.rb:207 def on_mime_head(mime_index, head, filename, content_type, name); end private - # pkg:gem/rack#lib/rack/multipart/parser.rb:213 + # pkg:gem/rack#lib/rack/multipart/parser.rb:232 def check_part_limits; end end -# pkg:gem/rack#lib/rack/multipart/parser.rb:166 +# pkg:gem/rack#lib/rack/multipart/parser.rb:185 class Rack::Multipart::Parser::Collector::BufferPart < ::Rack::Multipart::Parser::Collector::MimePart - # pkg:gem/rack#lib/rack/multipart/parser.rb:168 + # pkg:gem/rack#lib/rack/multipart/parser.rb:187 def close; end - # pkg:gem/rack#lib/rack/multipart/parser.rb:167 + # pkg:gem/rack#lib/rack/multipart/parser.rb:186 def file?; end end -# pkg:gem/rack#lib/rack/multipart/parser.rb:143 +# pkg:gem/rack#lib/rack/multipart/parser.rb:162 class Rack::Multipart::Parser::Collector::MimePart < ::Struct - # pkg:gem/rack#lib/rack/multipart/parser.rb:144 + # pkg:gem/rack#lib/rack/multipart/parser.rb:163 def get_data; end end -# pkg:gem/rack#lib/rack/multipart/parser.rb:171 +# pkg:gem/rack#lib/rack/multipart/parser.rb:190 class Rack::Multipart::Parser::Collector::TempfilePart < ::Rack::Multipart::Parser::Collector::MimePart - # pkg:gem/rack#lib/rack/multipart/parser.rb:173 + # pkg:gem/rack#lib/rack/multipart/parser.rb:192 def close; end - # pkg:gem/rack#lib/rack/multipart/parser.rb:172 + # pkg:gem/rack#lib/rack/multipart/parser.rb:191 def file?; end end -# pkg:gem/rack#lib/rack/multipart/parser.rb:113 +# pkg:gem/rack#lib/rack/multipart/parser.rb:120 Rack::Multipart::Parser::EMPTY = T.let(T.unsafe(nil), Rack::Multipart::Parser::MultipartInfo) # pkg:gem/rack#lib/rack/multipart/parser.rb:65 Rack::Multipart::Parser::MIME_HEADER_BYTESIZE_LIMIT = T.let(T.unsafe(nil), Integer) -# pkg:gem/rack#lib/rack/multipart/parser.rb:112 +# pkg:gem/rack#lib/rack/multipart/parser.rb:119 class Rack::Multipart::Parser::MultipartInfo < ::Struct - # pkg:gem/rack#lib/rack/multipart/parser.rb:112 + # pkg:gem/rack#lib/rack/multipart/parser.rb:119 def params; end - # pkg:gem/rack#lib/rack/multipart/parser.rb:112 + # pkg:gem/rack#lib/rack/multipart/parser.rb:119 def params=(_); end - # pkg:gem/rack#lib/rack/multipart/parser.rb:112 + # pkg:gem/rack#lib/rack/multipart/parser.rb:119 def tmp_files; end - # pkg:gem/rack#lib/rack/multipart/parser.rb:112 + # pkg:gem/rack#lib/rack/multipart/parser.rb:119 def tmp_files=(_); end class << self - # pkg:gem/rack#lib/rack/multipart/parser.rb:112 + # pkg:gem/rack#lib/rack/multipart/parser.rb:119 def [](*_arg0); end - # pkg:gem/rack#lib/rack/multipart/parser.rb:112 + # pkg:gem/rack#lib/rack/multipart/parser.rb:119 def inspect; end - # pkg:gem/rack#lib/rack/multipart/parser.rb:112 + # pkg:gem/rack#lib/rack/multipart/parser.rb:119 def keyword_init?; end - # pkg:gem/rack#lib/rack/multipart/parser.rb:112 + # pkg:gem/rack#lib/rack/multipart/parser.rb:119 def members; end - # pkg:gem/rack#lib/rack/multipart/parser.rb:112 + # pkg:gem/rack#lib/rack/multipart/parser.rb:119 def new(*_arg0); end end end -# pkg:gem/rack#lib/rack/multipart/parser.rb:554 +# pkg:gem/rack#lib/rack/multipart/parser.rb:370 +Rack::Multipart::Parser::OBS_UNFOLD = T.let(T.unsafe(nil), Regexp) + +# pkg:gem/rack#lib/rack/multipart/parser.rb:84 +Rack::Multipart::Parser::PARSER_BYTESIZE_LIMIT = T.let(T.unsafe(nil), Integer) + +# pkg:gem/rack#lib/rack/multipart/parser.rb:595 Rack::Multipart::Parser::REENCODE_DUMMY_ENCODINGS = T.let(T.unsafe(nil), Hash) # pkg:gem/rack#lib/rack/multipart/parser.rb:56 @@ -3692,7 +3701,7 @@ Rack::SET_COOKIE = T.let(T.unsafe(nil), String) # # The `x-accel-mapping` header should specify the location on the file system, # followed by an equals sign (=), followed name of the private URL pattern -# that it maps to. The middleware performs a simple substitution on the +# that it maps to. The middleware performs a case-insensitive substitution on the # resulting path. # # To enable `x-accel-redirect`, you must configure the middleware explicitly: @@ -4010,24 +4019,24 @@ class Rack::Static # pkg:gem/rack#lib/rack/static.rb:93 def initialize(app, options = T.unsafe(nil)); end - # pkg:gem/rack#lib/rack/static.rb:109 + # pkg:gem/rack#lib/rack/static.rb:112 def add_index_root?(path); end # Convert HTTP header rules to HTTP headers # - # pkg:gem/rack#lib/rack/static.rb:167 + # pkg:gem/rack#lib/rack/static.rb:170 def applicable_rules(path); end - # pkg:gem/rack#lib/rack/static.rb:125 + # pkg:gem/rack#lib/rack/static.rb:128 def call(env); end - # pkg:gem/rack#lib/rack/static.rb:121 + # pkg:gem/rack#lib/rack/static.rb:124 def can_serve(path); end - # pkg:gem/rack#lib/rack/static.rb:113 + # pkg:gem/rack#lib/rack/static.rb:116 def overwrite_file_path(path); end - # pkg:gem/rack#lib/rack/static.rb:117 + # pkg:gem/rack#lib/rack/static.rb:120 def route_file(path); end end @@ -4094,7 +4103,7 @@ module Rack::Utils # matches (same specificity and quality), the value returned # is arbitrary. # - # pkg:gem/rack#lib/rack/utils.rb:167 + # pkg:gem/rack#lib/rack/utils.rb:227 def best_q_match(q_value_header, available_mimes); end # pkg:gem/rack#lib/rack/utils.rb:120 @@ -4107,10 +4116,10 @@ module Rack::Utils # Returns nil if the header is missing or syntactically invalid. # Returns an empty array if none of the ranges are satisfiable. # - # pkg:gem/rack#lib/rack/utils.rb:402 - def byte_ranges(env, size); end + # pkg:gem/rack#lib/rack/utils.rb:492 + def byte_ranges(env, size, max_ranges: T.unsafe(nil)); end - # pkg:gem/rack#lib/rack/utils.rb:600 + # pkg:gem/rack#lib/rack/utils.rb:692 def clean_path_info(path_info); end # :nocov: @@ -4118,7 +4127,7 @@ module Rack::Utils # pkg:gem/rack#lib/rack/utils.rb:91 def clock_time; end - # pkg:gem/rack#lib/rack/utils.rb:360 + # pkg:gem/rack#lib/rack/utils.rb:450 def delete_cookie_header!(headers, key, value = T.unsafe(nil)); end # :call-seq: @@ -4135,7 +4144,7 @@ module Rack::Utils # delete_set_cookie_header("myname") # # => "myname=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT" # - # pkg:gem/rack#lib/rack/utils.rb:356 + # pkg:gem/rack#lib/rack/utils.rb:446 def delete_set_cookie_header(key, value = T.unsafe(nil)); end # :call-seq: @@ -4156,7 +4165,7 @@ module Rack::Utils # header # # => ["mycookie=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT"] # - # pkg:gem/rack#lib/rack/utils.rb:384 + # pkg:gem/rack#lib/rack/utils.rb:474 def delete_set_cookie_header!(header, key, value = T.unsafe(nil)); end # URI escapes. (CGI style space to +) @@ -4166,7 +4175,7 @@ module Rack::Utils # Escape ampersands, brackets and quotes to their HTML/XML entities. # - # pkg:gem/rack#lib/rack/utils.rb:183 + # pkg:gem/rack#lib/rack/utils.rb:243 def escape_html(_arg0); end # Like URI escaping, but with %20 instead of +. Strictly speaking this is @@ -4175,11 +4184,11 @@ module Rack::Utils # pkg:gem/rack#lib/rack/utils.rb:46 def escape_path(s); end - # pkg:gem/rack#lib/rack/utils.rb:149 + # pkg:gem/rack#lib/rack/utils.rb:152 def forwarded_values(forwarded_header); end - # pkg:gem/rack#lib/rack/utils.rb:406 - def get_byte_ranges(http_range, size); end + # pkg:gem/rack#lib/rack/utils.rb:496 + def get_byte_ranges(http_range, size, max_ranges: T.unsafe(nil)); end # :call-seq: # parse_cookies(env) -> hash @@ -4190,7 +4199,7 @@ module Rack::Utils # parse_cookies({'HTTP_COOKIE' => 'myname=myvalue'}) # # => {'myname' => 'myvalue'} # - # pkg:gem/rack#lib/rack/utils.rb:257 + # pkg:gem/rack#lib/rack/utils.rb:347 def parse_cookies(env); end # :call-seq: @@ -4203,7 +4212,7 @@ module Rack::Utils # parse_cookies_header('myname=myvalue; max-age=0') # # => {"myname"=>"myvalue", "max-age"=>"0"} # - # pkg:gem/rack#lib/rack/utils.rb:238 + # pkg:gem/rack#lib/rack/utils.rb:328 def parse_cookies_header(value); end # pkg:gem/rack#lib/rack/utils.rb:106 @@ -4215,7 +4224,7 @@ module Rack::Utils # pkg:gem/rack#lib/rack/utils.rb:138 def q_values(q_value_header); end - # pkg:gem/rack#lib/rack/utils.rb:395 + # pkg:gem/rack#lib/rack/utils.rb:485 def rfc2822(time); end # Constant time string comparison. @@ -4225,10 +4234,29 @@ module Rack::Utils # on variable length plaintext strings because it could leak length info # via timing attacks. # - # pkg:gem/rack#lib/rack/utils.rb:448 + # pkg:gem/rack#lib/rack/utils.rb:540 def secure_compare(a, b); end - # pkg:gem/rack#lib/rack/utils.rb:196 + # Given an array of available encoding strings, and an array of + # acceptable encodings for a request, where each element of the + # acceptable encodings array is an array where the first element + # is an encoding name and the second element is the numeric + # priority for the encoding, return the available encoding with + # the highest priority. + # + # The accept_encoding argument is typically generated by calling + # Request#accept_encoding. + # + # Example: + # + # select_best_encoding(%w(compress gzip identity), + # [["compress", 0.5], ["gzip", 1.0]]) + # # => "gzip" + # + # To reduce denial of service potential, only the first 16 + # acceptable encodings are considered. + # + # pkg:gem/rack#lib/rack/utils.rb:274 def select_best_encoding(available_encodings, accept_encoding); end # :call-seq: @@ -4251,7 +4279,7 @@ module Rack::Utils # set_cookie_header("myname", {value: "myvalue", max_age: 10}) # # => "myname=myvalue; max-age=10" # - # pkg:gem/rack#lib/rack/utils.rb:286 + # pkg:gem/rack#lib/rack/utils.rb:376 def set_cookie_header(key, value); end # :call-seq: @@ -4263,10 +4291,10 @@ module Rack::Utils # If the headers already contains a +set-cookie+ key, it will be converted # to an +Array+ if not already, and appended to. # - # pkg:gem/rack#lib/rack/utils.rb:330 + # pkg:gem/rack#lib/rack/utils.rb:420 def set_cookie_header!(headers, key, value); end - # pkg:gem/rack#lib/rack/utils.rb:582 + # pkg:gem/rack#lib/rack/utils.rb:674 def status_code(status); end # Unescapes a URI escaped string with +encoding+. +encoding+ will be the @@ -4281,7 +4309,7 @@ module Rack::Utils # pkg:gem/rack#lib/rack/utils.rb:52 def unescape_path(s); end - # pkg:gem/rack#lib/rack/utils.rb:617 + # pkg:gem/rack#lib/rack/utils.rb:709 def valid_path?(path); end class << self @@ -4290,7 +4318,7 @@ module Rack::Utils # matches (same specificity and quality), the value returned # is arbitrary. # - # pkg:gem/rack#lib/rack/utils.rb:167 + # pkg:gem/rack#lib/rack/utils.rb:227 def best_q_match(q_value_header, available_mimes); end # pkg:gem/rack#lib/rack/utils.rb:120 @@ -4303,10 +4331,10 @@ module Rack::Utils # Returns nil if the header is missing or syntactically invalid. # Returns an empty array if none of the ranges are satisfiable. # - # pkg:gem/rack#lib/rack/utils.rb:402 - def byte_ranges(env, size); end + # pkg:gem/rack#lib/rack/utils.rb:492 + def byte_ranges(env, size, max_ranges: T.unsafe(nil)); end - # pkg:gem/rack#lib/rack/utils.rb:600 + # pkg:gem/rack#lib/rack/utils.rb:692 def clean_path_info(path_info); end # :nocov: @@ -4320,7 +4348,7 @@ module Rack::Utils # pkg:gem/rack#lib/rack/utils.rb:30 def default_query_parser=(_arg0); end - # pkg:gem/rack#lib/rack/utils.rb:360 + # pkg:gem/rack#lib/rack/utils.rb:450 def delete_cookie_header!(headers, key, value = T.unsafe(nil)); end # :call-seq: @@ -4337,7 +4365,7 @@ module Rack::Utils # delete_set_cookie_header("myname") # # => "myname=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT" # - # pkg:gem/rack#lib/rack/utils.rb:356 + # pkg:gem/rack#lib/rack/utils.rb:446 def delete_set_cookie_header(key, value = T.unsafe(nil)); end # :call-seq: @@ -4358,7 +4386,7 @@ module Rack::Utils # header # # => ["mycookie=; max-age=0; expires=Thu, 01 Jan 1970 00:00:00 GMT"] # - # pkg:gem/rack#lib/rack/utils.rb:384 + # pkg:gem/rack#lib/rack/utils.rb:474 def delete_set_cookie_header!(header, key, value = T.unsafe(nil)); end # URI escapes. (CGI style space to +) @@ -4368,7 +4396,7 @@ module Rack::Utils # Escape ampersands, brackets and quotes to their HTML/XML entities. # - # pkg:gem/rack#lib/rack/utils.rb:183 + # pkg:gem/rack#lib/rack/utils.rb:243 def escape_html(_arg0); end # Like URI escaping, but with %20 instead of +. Strictly speaking this is @@ -4377,11 +4405,11 @@ module Rack::Utils # pkg:gem/rack#lib/rack/utils.rb:46 def escape_path(s); end - # pkg:gem/rack#lib/rack/utils.rb:149 + # pkg:gem/rack#lib/rack/utils.rb:152 def forwarded_values(forwarded_header); end - # pkg:gem/rack#lib/rack/utils.rb:406 - def get_byte_ranges(http_range, size); end + # pkg:gem/rack#lib/rack/utils.rb:496 + def get_byte_ranges(http_range, size, max_ranges: T.unsafe(nil)); end # pkg:gem/rack#lib/rack/utils.rb:65 def multipart_file_limit; end @@ -4419,7 +4447,7 @@ module Rack::Utils # parse_cookies({'HTTP_COOKIE' => 'myname=myvalue'}) # # => {'myname' => 'myvalue'} # - # pkg:gem/rack#lib/rack/utils.rb:257 + # pkg:gem/rack#lib/rack/utils.rb:347 def parse_cookies(env); end # :call-seq: @@ -4432,7 +4460,7 @@ module Rack::Utils # parse_cookies_header('myname=myvalue; max-age=0') # # => {"myname"=>"myvalue", "max-age"=>"0"} # - # pkg:gem/rack#lib/rack/utils.rb:238 + # pkg:gem/rack#lib/rack/utils.rb:328 def parse_cookies_header(value); end # pkg:gem/rack#lib/rack/utils.rb:106 @@ -4444,7 +4472,7 @@ module Rack::Utils # pkg:gem/rack#lib/rack/utils.rb:138 def q_values(q_value_header); end - # pkg:gem/rack#lib/rack/utils.rb:395 + # pkg:gem/rack#lib/rack/utils.rb:485 def rfc2822(time); end # Constant time string comparison. @@ -4454,10 +4482,29 @@ module Rack::Utils # on variable length plaintext strings because it could leak length info # via timing attacks. # - # pkg:gem/rack#lib/rack/utils.rb:448 + # pkg:gem/rack#lib/rack/utils.rb:540 def secure_compare(a, b); end - # pkg:gem/rack#lib/rack/utils.rb:196 + # Given an array of available encoding strings, and an array of + # acceptable encodings for a request, where each element of the + # acceptable encodings array is an array where the first element + # is an encoding name and the second element is the numeric + # priority for the encoding, return the available encoding with + # the highest priority. + # + # The accept_encoding argument is typically generated by calling + # Request#accept_encoding. + # + # Example: + # + # select_best_encoding(%w(compress gzip identity), + # [["compress", 0.5], ["gzip", 1.0]]) + # # => "gzip" + # + # To reduce denial of service potential, only the first 16 + # acceptable encodings are considered. + # + # pkg:gem/rack#lib/rack/utils.rb:274 def select_best_encoding(available_encodings, accept_encoding); end # :call-seq: @@ -4480,7 +4527,7 @@ module Rack::Utils # set_cookie_header("myname", {value: "myvalue", max_age: 10}) # # => "myname=myvalue; max-age=10" # - # pkg:gem/rack#lib/rack/utils.rb:286 + # pkg:gem/rack#lib/rack/utils.rb:376 def set_cookie_header(key, value); end # :call-seq: @@ -4492,10 +4539,10 @@ module Rack::Utils # If the headers already contains a +set-cookie+ key, it will be converted # to an +Array+ if not already, and appended to. # - # pkg:gem/rack#lib/rack/utils.rb:330 + # pkg:gem/rack#lib/rack/utils.rb:420 def set_cookie_header!(headers, key, value); end - # pkg:gem/rack#lib/rack/utils.rb:582 + # pkg:gem/rack#lib/rack/utils.rb:674 def status_code(status); end # Unescapes a URI escaped string with +encoding+. +encoding+ will be the @@ -4510,11 +4557,14 @@ module Rack::Utils # pkg:gem/rack#lib/rack/utils.rb:52 def unescape_path(s); end - # pkg:gem/rack#lib/rack/utils.rb:617 + # pkg:gem/rack#lib/rack/utils.rb:709 def valid_path?(path); end end end +# pkg:gem/rack#lib/rack/utils.rb:149 +Rack::Utils::ALLOWED_FORWARED_PARAMS = T.let(T.unsafe(nil), Hash) + # pkg:gem/rack#lib/rack/utils.rb:25 Rack::Utils::COMMON_SEP = T.let(T.unsafe(nil), Hash) @@ -4524,24 +4574,24 @@ Rack::Utils::COMMON_SEP = T.let(T.unsafe(nil), Hash) # would be the request environment. The second of which would be the rack # application that the request would be forwarded to. # -# pkg:gem/rack#lib/rack/utils.rb:471 +# pkg:gem/rack#lib/rack/utils.rb:563 class Rack::Utils::Context - # pkg:gem/rack#lib/rack/utils.rb:474 + # pkg:gem/rack#lib/rack/utils.rb:566 def initialize(app_f, app_r); end - # pkg:gem/rack#lib/rack/utils.rb:472 + # pkg:gem/rack#lib/rack/utils.rb:564 def app; end - # pkg:gem/rack#lib/rack/utils.rb:479 + # pkg:gem/rack#lib/rack/utils.rb:571 def call(env); end - # pkg:gem/rack#lib/rack/utils.rb:487 + # pkg:gem/rack#lib/rack/utils.rb:579 def context(env, app = T.unsafe(nil)); end - # pkg:gem/rack#lib/rack/utils.rb:472 + # pkg:gem/rack#lib/rack/utils.rb:564 def for; end - # pkg:gem/rack#lib/rack/utils.rb:483 + # pkg:gem/rack#lib/rack/utils.rb:575 def recontext(app); end end @@ -4555,7 +4605,7 @@ Rack::Utils::DEFAULT_SEP = T.let(T.unsafe(nil), Regexp) # .reject {|v| v['Description'] == 'Unassigned' or v['Description'].include? '(' } \ # .map {|v| %Q/#{v['Value']} => '#{v['Description']}'/ }.join(','+?\n)" # -# pkg:gem/rack#lib/rack/utils.rb:498 +# pkg:gem/rack#lib/rack/utils.rb:590 Rack::Utils::HTTP_STATUS_CODES = T.let(T.unsafe(nil), Hash) # pkg:gem/rack#lib/rack/utils.rb:22 @@ -4564,16 +4614,16 @@ Rack::Utils::InvalidParameterError = Rack::QueryParser::InvalidParameterError # pkg:gem/rack#lib/rack/utils.rb:26 Rack::Utils::KeySpaceConstrainedParams = Rack::QueryParser::Params -# pkg:gem/rack#lib/rack/utils.rb:615 +# pkg:gem/rack#lib/rack/utils.rb:707 Rack::Utils::NULL_BYTE = T.let(T.unsafe(nil), String) -# pkg:gem/rack#lib/rack/utils.rb:568 +# pkg:gem/rack#lib/rack/utils.rb:660 Rack::Utils::OBSOLETE_SYMBOLS_TO_STATUS_CODES = T.let(T.unsafe(nil), Hash) -# pkg:gem/rack#lib/rack/utils.rb:576 +# pkg:gem/rack#lib/rack/utils.rb:668 Rack::Utils::OBSOLETE_SYMBOL_MAPPINGS = T.let(T.unsafe(nil), Hash) -# pkg:gem/rack#lib/rack/utils.rb:598 +# pkg:gem/rack#lib/rack/utils.rb:690 Rack::Utils::PATH_SEPS = T.let(T.unsafe(nil), Regexp) # pkg:gem/rack#lib/rack/utils.rb:21 @@ -4584,10 +4634,10 @@ Rack::Utils::ParamsTooDeepError = Rack::QueryParser::QueryLimitError # Responses with HTTP status codes that should not have an entity body # -# pkg:gem/rack#lib/rack/utils.rb:562 +# pkg:gem/rack#lib/rack/utils.rb:654 Rack::Utils::STATUS_WITH_NO_ENTITY_BODY = T.let(T.unsafe(nil), Hash) -# pkg:gem/rack#lib/rack/utils.rb:564 +# pkg:gem/rack#lib/rack/utils.rb:656 Rack::Utils::SYMBOL_TO_STATUS_CODE = T.let(T.unsafe(nil), Hash) # pkg:gem/rack#lib/rack/utils.rb:27 @@ -4596,7 +4646,7 @@ Rack::Utils::URI_PARSER = T.let(T.unsafe(nil), URI::RFC2396_Parser) # A valid cookie key according to RFC6265 and RFC2616. # A can be any US-ASCII characters, except control characters, spaces, or tabs. It also must not contain a separator character like the following: ( ) < > @ , ; : \ " / [ ] ? = { }. # -# pkg:gem/rack#lib/rack/utils.rb:263 +# pkg:gem/rack#lib/rack/utils.rb:353 Rack::Utils::VALID_COOKIE_KEY = T.let(T.unsafe(nil), Regexp) # pkg:gem/rack#lib/rack/version.rb:9