Problem inserting the % into my database

15 views
Skip to first unread message

desbest

unread,
Oct 18, 2015, 2:25:00 PM10/18/15
to Ramaze
Hi everyone
I really love ramaze but I'm having a problem with it that seems serious.
Basically, when I try to insert the % symbol into my database or have % in my POST data, I get a fatal exception and the page fails to load.
Below is the line that is causing the problem.

data = request.subset(:content, :post_id)

When post data contains a % symbol, I get an exception.
I'm using ruby 1.9.3 or 1.9.4 and Ramaze 2012.04.14 which is are old versions.


ArgumentError: invalid %-encoding?

Can anyone help? It'd me much appreciated. 

James Britt

unread,
Oct 18, 2015, 10:14:14 PM10/18/15
to ram...@googlegroups.com
desbest wrote:
> Hi everyone
> I really love ramaze but I'm having a problem with it that seems serious.
> Basically, when I try to insert the % symbol into my database or have %
> in my POST data, I get a fatal exception and the page fails to load.
> Below is the line that is causing the problem.
>
> data = request.subset(:content, :post_id)
>
>
> When post data contains a % symbol, I get an exception.


Do you want the literal '%' character?

There might be some conflict with that character also being used for CGI
encoding (e.g. '%3A' is the character ':')

So if it ends up in some input that then gets CGI unescaped it might
bork something.

Maybe.



James



--

jamesbritt.com - Live curious
justthebestparts.com - Feed your head
neurogami.com - Hack your world

desbest

unread,
Oct 20, 2015, 9:48:53 AM10/20/15
to Ramaze
Yes I want the literal % character. I am typing it from my keyboard.
Any ideas?
Reply all
Reply to author
Forward
0 new messages