mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
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>
This commit is contained in:
parent
0dce4c4bca
commit
1492444ecb
4 changed files with 33 additions and 4 deletions
|
@ -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))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue