pastebin backend: stricter URL matching

This commit is contained in:
Laurent Bachelier 2011-05-01 22:29:58 +02:00
commit f11d093e22

View file

@ -38,7 +38,7 @@ class BadAPIRequest(Exception):
class PastebinBrowser(BaseBrowser):
DOMAIN = 'pastebin.com'
ENCODING = 'UTF-8'
PASTE_URL = 'http://%s/(?P<id>.+)' % DOMAIN
PASTE_URL = 'http://%s/(?P<id>\w+)' % DOMAIN
API_URL = 'http://%s/api/api_post.php' % DOMAIN
PAGES = {PASTE_URL: PastePage,
'http://%s/' % DOMAIN: PostPage}