]> git.ipfire.org Git - people/mfischer/ipfire-2.x.git/commit - src/squid-accounting/accounting.cgi
accounting.cgi: Change some variables to alphanumeric - Bug#12777
authorAdolf Belka <adolf.belka@ipfire.org>
Fri, 18 Feb 2022 14:33:52 +0000 (15:33 +0100)
committerPeter Müller <peter.mueller@ipfire.org>
Fri, 18 Feb 2022 22:06:35 +0000 (22:06 +0000)
commitab50bf41fec93cf480e66140d2161580f4d72926
tree0bdd0a82ee245363dafca73a6a760f1ad64175ef
parent772d3dbd6091b75fa10317c88c25c53ce466f825
accounting.cgi: Change some variables to alphanumeric - Bug#12777

- The Postcode in the address only allowed numeric postcodes. The Netherlands and Great
   Britain are at lease two countries that use alphanumeric postcodes with spaces. Changed
   the postcode check from numeric to alphanumeric.
- The Bank Code in the Providers details only allowed numeric Bank Codes. In Great Britain
   the Bank Code, also known as the Sort Code is made up of three groups of digits separated
   by a - .
- Adjusted the regex for the alphanumeric check to include a space and a - . The original
   comment indicated that a - was allowed but it was not included in the regex.
- Tested on a vm system and confirmed that a postcode from The Netherlands and Great Britain
   and a Sort Code from Breat Britain are now accepted.

Fixes: Bug#12777
Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
src/squid-accounting/accounting.cgi