singlebrook / utf8-cleaner

MIT License
277 stars 44 forks source link

data loss on CONTENT_TYPE = multipart #15

Closed nyku closed 10 years ago

nyku commented 10 years ago

Try to upload an image. A monkeypatch for this (as initializer) is :

module UTF8Cleaner
  class Middleware
    def call(env)
      if env['CONTENT_TYPE'] && env['CONTENT_TYPE'] =~ /multipart\/form-data/
        @app.call(env)
      else
        @app.call(sanitize_env(env))
      end
    end
  end
end

Please fix this ASAP!

sbleon commented 10 years ago

Thanks for reporting this, @nyku ! We were definitely being too aggressive. I think the master branch has this fixed. Can you give it a try?

sbleon commented 10 years ago

This is fixed in version 0.0.9.

idanci commented 10 years ago

Thanks, @nyku will check this week

nyku commented 10 years ago

@sbleon , danke schön! approve