Giter Site home page Giter Site logo

Bad content-types about mail HOT 3 CLOSED

mikel avatar mikel commented on June 3, 2024
Bad content-types

from mail.

Comments (3)

jlindley avatar jlindley commented on June 3, 2024

Actually now I've run across another unparseable field in some emails, namely:

Content-Location: file://spr1inf1/scripts/password_reset_email/password_reset_html/reset.gif

(It's invalid because it's not in quotes and contains a colon, as a 'token' under RFC 2045). What's the general philosophy to be for handling unparseable fields? At least with content-type (in the original post) there's a standard to fall back on (text/plain), but not so obviously with locations. Should the library discard crap, or try to guess where to quotes should go?

  • Jim

from mail.

mikel avatar mikel commented on June 3, 2024

Ok... so the overriding philosophy is "don't loose any information", the other one is "don't nuke user info with something generated"

In this case, we could implement a "quote_if_needed" method on the content-location in the initialization method of field/content_location.rb

Maybe, make the method inside of lib/utilities.rb, you can look in the existing ActionMailer on how to implement this, then call that on the passed in value of content-location... as content-location is only ever going to be a single value.

But if we have that in utilities, we could then possibly parse any other param fields in content-disposition or content-type, again, before treetop gets to it.

Mikel

from mail.

mikel avatar mikel commented on June 3, 2024

2acb70a: Closes Issue #1 - Handling badly formatted content-type fields

from mail.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.