rjanot / YuccaPrerenderBundle

Symfony2 Bundle to use prerender.io
MIT License
56 stars 15 forks source link

_escaped_fragment_check bug #7

Closed thoop closed 10 years ago

thoop commented 10 years ago

I found this on the prerender-node middleware. Someone was passing around a bad url: http://prerender.io/?utm_source=javascriptweekly&utm_medium=email?_escaped_fragment_=

Notice the two ?.

I changed the prerender-node and prerender_rails middleware to parse the query string and make sure _escaped_fragment_ is a key of the query string, not just present in it.

https://github.com/collectiveip/prerender_rails/blob/master/lib/prerender_rails.rb#L82 https://github.com/collectiveip/prerender-node/blob/master/index.js#L81

Because it wasn't a key in that bad url case, the old way of checking was causing an infinite loop of prerendering to happen :)

rjanot commented 10 years ago

Already handled this way

thoop commented 10 years ago

Nice!