Check for newlines in project descriptions
As we found out with I88751ed6df7d5f9dad735171e19f82dea745b4da and the resulting downtime, cgit does not like multi-line description values. The cgit(5) man page is conspicuously quiet on quoting or multi-line values; let's just ensure we don't do this again. This does detect the newlines in the original change. Change-Id: I87bcff409d4632c70bff5e4606b4572c38c74e59
This commit is contained in:
parent
a53c7ba6cd
commit
3647a2f1cb
@ -121,6 +121,12 @@ def main():
|
||||
(('astor', 'Astor', 'astra', 'Astra', 'astara'), 'Astara')
|
||||
)
|
||||
if description:
|
||||
# newlines here mess up cgit "repo.desc
|
||||
if '\n' in description:
|
||||
found_errors += 1
|
||||
print("ERROR: Descriptions should not contain newlines:")
|
||||
print(' "%s"' % description)
|
||||
|
||||
for words, should_be in badwords:
|
||||
for word in words:
|
||||
# look for the bad word hanging out on it's own. Only
|
||||
|
Loading…
Reference in New Issue
Block a user