Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Posting Image URLs #102

Open
sweinberg opened this issue Jan 15, 2014 · 0 comments
Open

Posting Image URLs #102

sweinberg opened this issue Jan 15, 2014 · 0 comments

Comments

@sweinberg
Copy link
Contributor

This addition to app/models/post.rb produces some false-positives. It prevents the submission of a link that has a blacklisted file extension anywhere in the URL at all, not just at the end of it.

This works to block direct image links like foo.com/bar.gif, but it also can block a legitimate link to an article which just happens to have 'gif' in the post title.

Try submitting this post: http://thelist.io/posts/new?u=http://nautil.us/blog/the-math-trick-behind-mp3s-jpegs-and-homer-simpsons-face&t=The%20Math%20Trick%20Behind%20MP3s,%20JPEGs,%20and%20Homer%20Simpson%E2%80%99s%20Face

Solution: Only block links with a blacklisted file extension located at the end of the URL, prefixed with a .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant