From: Joseph Jones Date: 2015-12-17T21:07:31-07:00 Subject: [ruby-core:72310] [Ruby trunk - Bug #11819] [Open] URI::encode issue with the \"+\" character --56738683_7bd3ee7b_16c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Joseph Jones liked your message with Boxer. On December 14, 2015 at 22:39= :09 MST, anykeyh=40gmail.com wrote:Issue =2311819 has been reported by Ya= cine PETITPREZ.----------------------------------------Bug =2311819: URI:= :encode issue with the =22+=22 characterhttps://bugs.ruby-lang.org/issues= /11819* Author: Yacine PETITPREZ* Status: Open* Priority: Normal* Assigne= e: * ruby -v: * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN-----= -----------------------------------=60URI.encode(=22a+b=22)=60 returns =22= a+b=22. Mostly all web servers transform the =22+=22 in URI parameters to= space, and can create issue with base64 encoded parameters for example.C= urrently we must write this: =60args =3D URI.encode(args).gsub(=22+=22, =22= %2B=22)=60Also, the rfc2396 says (G. 2):=60 The plus =22+=22, dollar =22=24= =22, and comma =22,=22 characters have been added to those in the =22rese= rved=22 set, since they are treated as reserved within the query componen= t.=60-- https://bugs.ruby-lang.org/ --56738683_7bd3ee7b_16c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Joseph Jones liked your message with Boxer.


= On December 14, 2015 at 22:39:09 MST, anykeyh=40gmail.com wrote:
Issue =2311819 has been report= ed by Yacine PETITPREZ.

--------------------------------------= --
Bug =2311819: URI::encode issue with the =22+=22 character
h= ttps://bugs.ruby-lang.org/issues/11819

* Author: Yacine PETITP= REZ
* Status: Open
* Priority: Normal
* Assignee:
* = ruby -v:
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------

=60URI.encode(=22a+= b=22)=60 returns =22a+b=22. Mostly all web servers transform the =22+=22 = in URI parameters to space, and can create issue with base64 encoded para= meters for example.

Currently we must write this:

= =60args =3D URI.encode(args).gsub(=22+=22, =22%2B=22)=60

Also,= the rfc2396 says (G. 2):

=60 The plus =22+=22, dollar =22=24= =22, and comma =22,=22 characters have been added to
those in the= =22reserved=22 set, since they are treated as reserved
within th= e query component.=60




--
https://bugs.= ruby-lang.org/
--56738683_7bd3ee7b_16c--