rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / Atom feed
From: James Tucker <jftucker@gmail.com>
To: rack-devel@googlegroups.com
Subject: Re: Invalid query string handling
Date: Tue, 24 Nov 2009 10:22:42 +0000	[thread overview]
Message-ID: <4C9925A9-FC76-453E-BE83-0E21D074424B@gmail.com> (raw)
In-Reply-To: <9b62ed110911240141v5223c470gccf2cedc50b1257a@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1133 bytes --]


On 24 Nov 2009, at 09:41, Maciej Lotkowski wrote:

> On Tue, Nov 24, 2009 at 10:18 AM, James Tucker <jftucker@gmail.com> wrote:
>> On 23 Nov 2009, at 12:41, Maciej Lotkowski wrote:
>> 
>>> Hi,
>>> 
>>> recently I stumbled upon a problem:
>>> 
>>> require 'rubygems'
>>> require 'rack'
>>> require 'rack/mock'
>>> 
>>> 
>>> app = lambda { |env|
>>>  Rack::Request.new(env).GET
>>> }
>>> app.call(Rack::MockRequest.env_for("/kiszka?foo=&foo[option]=kiszka"))
>> 
>> remove foo=<empty string> from the front of your query string.
> 
> It's not my query string, smeone just tries to flood my app with
> strange requests.
> But that's not the point.
> 
> 
> On Tue, Nov 24, 2009 at 10:25 AM, Magnus Holm <judofyr@gmail.com> wrote:
>> Maybe we should have a Rack::BadRequest, which can be raised when needed?
> 
> That's what I mean. TypeError isn't an exception which you can expect to raised
> because of invalid request.

Combine this with the other issues in various request parsing discussions, I'm starting to think this wants to be pushed right into middleware.

> 
> -- 
> Maciej Lotkowski


[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 3679 bytes --]

  reply	other threads:[~2009-11-24 10:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-23 12:41 Invalid query string handling Maciej Lotkowski
2009-11-24  9:18 ` James Tucker
2009-11-24  9:41   ` Maciej Lotkowski
2009-11-24 10:22     ` James Tucker [this message]
2009-11-24  9:25 ` Magnus Holm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://groups.google.com/group/rack-devel

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C9925A9-FC76-453E-BE83-0E21D074424B@gmail.com \
    --to=rack-devel@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).