summaryrefslogtreecommitdiffstats
path: root/aurweb
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2016-10-11 08:09:21 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2016-10-11 08:36:40 +0200
commit1492444ecbe68e4498a6f7ae0258c39ebbd47138 (patch)
tree6fcfb821edf48b10e4c030c72422e70cc9bee280 /aurweb
parent0dce4c4bcabec79ae796d38c3c93d424a42f718c (diff)
downloadaur-1492444ecbe68e4498a6f7ae0258c39ebbd47138.tar.gz
aur-1492444ecbe68e4498a6f7ae0258c39ebbd47138.tar.xz
Make URL columns 8000 characters wide
According to RFC 7230, URLs can be up too 8000 characters long. Resize all URL fields accordingly. Also, add a test to verify that URLs with more than 8000 characters are rejected by the update hook. Reported-by: Andreas Linz <klingt.net@gmail.com> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'aurweb')
-rwxr-xr-xaurweb/git/update.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/aurweb/git/update.py b/aurweb/git/update.py
index 73373410..af2dfed8 100755
--- a/aurweb/git/update.py
+++ b/aurweb/git/update.py
@@ -324,8 +324,9 @@ def main():
die_commit('invalid package name: {:s}'.format(
pkginfo['pkgname']), str(commit.id))
- for field in ('pkgname', 'pkgdesc', 'url'):
- if field in pkginfo and len(pkginfo[field]) > 255:
+ max_len = {'pkgname': 255, 'pkgdesc': 255, 'url': 8000}
+ for field in max_len.keys():
+ if field in pkginfo and len(pkginfo[field]) > max_len[field]:
die_commit('{:s} field too long: {:s}'.format(field,
pkginfo[field]), str(commit.id))