|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
Site not considered safe revisited
Sebastian, I just noticed something.
Are you using libwww-perl or Python-urllib/2
or even PHP/5 to GET the playlist?You might think about changing the user agent in your script to spiff(+http://xspf.org)
or xspf(+http://xspf.org). All of these scripting languages are
used extensively with unadulterated user agent strings to unmercifully
hack at web servers all over cyberspace.
I've had to block them as user agents to protect my files and bandwidth
as have many many other people.Examples I found are here: Perl: http://kobesearch.cpan.org/htdocs/libwww-perl/LWP/UserAgent.htmlPython: http://diveintopython.org/http_web_services/user_agent.htmlPHP: http://www.seopher.com/articles/how_to_change_your_php_user_agent_to_avoid_being_blocked_when_using_curl-Tom xspfphp.sourceforge.net _______________________________________________ Playlist mailing list Playlist@... http://lists.musicbrainz.org/mailman/listinfo/playlist |
|
|
Re: Site not considered safe revisitedOn Thursday 16 April 2009, Tom wrote:
> Are you using| libwww-perl |or| ||Python-urllib/2 |or even |PHP/5 |to > GET the playlist?| > > |You might think about changing the user agent in your script to > > /spiff(+http://xspf.org)/ or /xspf(+http://xspf.org)/. All of these > scripting languages are used extensively with unadulterated user > agent strings to unmercifully hack at web servers all over > cyberspace. I've had to block them as user agents to protect my files > and bandwidth as have many many other people. Installing protection based on User-Agents is most harmful. You will unnecessarily cause pain for users of your site (such as people using RSS readers), yourself and others (as seen here). Furthermore, you probably miss most of the "attacks" on your site because they are shadowed by people who know how to alter the User-Agent and will pop up as some Windows XP Internet Explorer in your stats. While it is possible to alter the User-Agent HTTP header using urllib2 in Python, I would recommend you rethink your filters, work around the problems you are causing (by downloading the file yourself and use the file upload) or submit a patch. Robert _______________________________________________ Playlist mailing list Playlist@... http://lists.musicbrainz.org/mailman/listinfo/playlist |
|
|
|
|
|
|
| Free embeddable forum powered by Nabble | Forum Help |