diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-02-28 10:00:33 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-02-28 10:00:33 +0100 |
commit | 04724ed189553ce43f8504f68fef8024ef5796de (patch) | |
tree | a8f18a8ede9d226988bb4a2f5923ff56545a2e58 /src/validators | |
parent | d41e8e860a66f45d295081f024aa2918f221443f (diff) | |
download | vyos-1x-04724ed189553ce43f8504f68fef8024ef5796de.tar.gz vyos-1x-04724ed189553ce43f8504f68fef8024ef5796de.zip |
validators: fqdn: T3370: support "private" or "local" domain names
Diffstat (limited to 'src/validators')
-rwxr-xr-x | src/validators/fqdn | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/validators/fqdn b/src/validators/fqdn index 66276c093..a4027e4ca 100755 --- a/src/validators/fqdn +++ b/src/validators/fqdn @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2020 VyOS maintainers and contributors +# Copyright (C) 2020-2021 VyOS maintainers and contributors # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 or later as @@ -17,8 +17,7 @@ import re import sys -# pattern copied from: https://www.regextester.com/103452 -pattern = "(?=^.{4,253}$)(^((?!-)[a-zA-Z0-9-]{0,62}[a-zA-Z0-9]\.)+[a-zA-Z]{2,63}$)" +pattern = '[A-Za-z0-9][-.A-Za-z0-9]*' if __name__ == '__main__': if len(sys.argv) != 2: |