Page MenuHomeVyOS Platform

Multiline login banner text reports error on commit
Open, LowPublic

Description

In general, some simple input text scrubbing could go a long way here

[email protected]# set system login banner pre-login "======================================================================= \n=========================   NOTICE TO USERS   ========================= \n======================================================================= \n                                                                        \nThis is an official computer system and is private property. It is for  \nauthorized users only. Unauthorized users are prohibited. Users         \n(authorized or unauthorized) have no explicit or implicit expectation   \nof privacy. Any or all uses of this system may be subject to one or     \nmore of the following actions: interception, monitoring, recording,     \nauditing, inspection and disclosing to security personnel and law       \nenforcement personnel, as well as authorized officials of other         \nagencies, both domestic and foreign. By using this system, the user     \nconsents to these actions. Unauthorized or improper use of this system  \nmay result in administrative disciplinary action and civil and          \ncriminal penalties.                                                     \n                                                                        \nBy accessing this system you indicate your awareness of and consent to  \nthese terms and conditions of use.  Discontinue access immediately      \nif you do not agree to the conditions stated in this notice.            \n                                                                        \n======================================================================= \n"
[edit]
[email protected]# commit
[ system login ]
VyOS had an issue completing a command.

We are sorry that you encountered a problem while using VyOS.
There are a few things you can do to help us (and yourself):
- Contact us using the online help desk if you have a subscription:
  https://support.vyos.io/
- Make sure you are running the latest version of VyOS available at:
  https://vyos.net/get/
- Consult the community forum to see how to handle this issue:
  https://forum.vyos.io
- Join us on Slack where our users exchange help and advice:
  https://vyos.slack.com

When reporting problems, please include as much information as possible:
- do not obfuscate any data (feel free to contact us privately if your
  business policy requires it)
- and include all the information presented below

Report time:      2022-04-24 06:54:33
Image version:    VyOS 1.4-rolling-202204230217
Release train:    sagitta

Built by:         autobu[email protected]
Built on:         Sat 23 Apr 2022 02:17 UTC
Build UUID:       9fc8318c-069f-4822-a8d4-112a49431340
Build commit ID:  cb4ce6caf048aa

Architecture:     x86_64
Boot via:         installed image
System type:      bare metal

Hardware vendor:  Supermicro
Hardware model:   Super Server
Hardware S/N:     0123456789
Hardware UUID:    00000000-0000-0000-0000-3cecef01a24c

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/system-login.py", line 313, in <module>
    c = get_config()
  File "/usr/libexec/vyos/conf_mode/system-login.py", line 63, in get_config
    login = conf.get_config_dict(base, key_mangling=('-', '_'),
  File "/usr/lib/python3/dist-packages/vyos/config.py", line 238, in get_config_dict
    root_dict = self.get_cached_root_dict(effective)
  File "/usr/lib/python3/dist-packages/vyos/config.py", line 216, in get_cached_root_dict
    config_dict = json.loads(config.to_json())
  File "/usr/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.9/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.9/json/decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Invalid \escape: line 1 column 45496 (char 45495)



[[system login]] failed
Commit failed
[edit]

With "----"

[email protected]# set system login banner pre-login "----------------------------------------------------------------------- \n-------------------------   NOTICE TO USERS   ------------------------- \n----------------------------------------------------------------------- \n                                                                        \nThis is an official computer system and is private property. It is for  \nauthorized users only. Unauthorized users are prohibited. Users         \n(authorized or unauthorized) have no explicit or implicit expectation   \nof privacy. Any or all uses of this system may be subject to one or     \nmore of the following actions: interception, monitoring, recording,     \nauditing, inspection and disclosing to security personnel and law       \nenforcement personnel, as well as authorized officials of other         \nagencies, both domestic and foreign. By using this system, the user     \nconsents to these actions. Unauthorized or improper use of this system  \nmay result in administrative disciplinary action and civil and          \ncriminal penalties.                                                     \n                                                                        \nBy accessing this system you indicate your awareness of and consent to  \nthese terms and conditions of use.  Discontinue access immediately      \nif you do not agree to the conditions stated in this notice.            \n                                                                        \n----------------------------------------------------------------------- \n"
[edit]
[email protected]# commit
[ system login ]
VyOS had an issue completing a command.

We are sorry that you encountered a problem while using VyOS.
There are a few things you can do to help us (and yourself):
- Contact us using the online help desk if you have a subscription:
  https://support.vyos.io/
- Make sure you are running the latest version of VyOS available at:
  https://vyos.net/get/
- Consult the community forum to see how to handle this issue:
  https://forum.vyos.io
- Join us on Slack where our users exchange help and advice:
  https://vyos.slack.com

When reporting problems, please include as much information as possible:
- do not obfuscate any data (feel free to contact us privately if your
  business policy requires it)
- and include all the information presented below

Report time:      2022-04-24 06:55:30
Image version:    VyOS 1.4-rolling-202204230217
Release train:    sagitta

Built by:         [email protected]
Built on:         Sat 23 Apr 2022 02:17 UTC
Build UUID:       9fc8318c-069f-4822-a8d4-112a49431340
Build commit ID:  cb4ce6caf048aa

Architecture:     x86_64
Boot via:         installed image
System type:      bare metal

Hardware vendor:  Supermicro
Hardware model:   Super Server
Hardware S/N:     0123456789
Hardware UUID:    00000000-0000-0000-0000-3cecef01a24c

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/system-login.py", line 313, in <module>
    c = get_config()
  File "/usr/libexec/vyos/conf_mode/system-login.py", line 63, in get_config
    login = conf.get_config_dict(base, key_mangling=('-', '_'),
  File "/usr/lib/python3/dist-packages/vyos/config.py", line 238, in get_config_dict
    root_dict = self.get_cached_root_dict(effective)
  File "/usr/lib/python3/dist-packages/vyos/config.py", line 216, in get_cached_root_dict
    config_dict = json.loads(config.to_json())
  File "/usr/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.9/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.9/json/decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Invalid \escape: line 1 column 45496 (char 45495)



[[system login]] failed
Commit failed
[edit]

With neither --- nor ===

[email protected]# set system login banner pre-login " \n   NOTICE TO USERS    \n \n                                                                        \nThis is an official computer system and is private property. It is for  \nauthorized users only. Unauthorized users are prohibited. Users         \n(authorized or unauthorized) have no explicit or implicit expectation   \nof privacy. Any or all uses of this system may be subject to one or     \nmore of the following actions: interception, monitoring, recording,     \nauditing, inspection and disclosing to security personnel and law       \nenforcement personnel, as well as authorized officials of other         \nagencies, both domestic and foreign. By using this system, the user     \nconsents to these actions. Unauthorized or improper use of this system  \nmay result in administrative disciplinary action and civil and          \ncriminal penalties.                                                     \n                                                                        \nBy accessing this system you indicate your awareness of and consent to  \nthese terms and conditions of use.  Discontinue access immediately      \nif you do not agree to the conditions stated in this notice.            \n                                                                        \n \n"
[edit]
[email protected]# commit
[ system login ]
VyOS had an issue completing a command.

We are sorry that you encountered a problem while using VyOS.
There are a few things you can do to help us (and yourself):
- Contact us using the online help desk if you have a subscription:
  https://support.vyos.io/
- Make sure you are running the latest version of VyOS available at:
  https://vyos.net/get/
- Consult the community forum to see how to handle this issue:
  https://forum.vyos.io
- Join us on Slack where our users exchange help and advice:
  https://vyos.slack.com

When reporting problems, please include as much information as possible:
- do not obfuscate any data (feel free to contact us privately if your
  business policy requires it)
- and include all the information presented below

Report time:      2022-04-24 06:56:18
Image version:    VyOS 1.4-rolling-202204230217
Release train:    sagitta

Built by:         [email protected]
Built on:         Sat 23 Apr 2022 02:17 UTC
Build UUID:       9fc8318c-069f-4822-a8d4-112a49431340
Build commit ID:  cb4ce6caf048aa

Architecture:     x86_64
Boot via:         installed image
System type:      bare metal

Hardware vendor:  Supermicro
Hardware model:   Super Server
Hardware S/N:     0123456789
Hardware UUID:    00000000-0000-0000-0000-3cecef01a24c

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/system-login.py", line 313, in <module>
    c = get_config()
  File "/usr/libexec/vyos/conf_mode/system-login.py", line 63, in get_config
    login = conf.get_config_dict(base, key_mangling=('-', '_'),
  File "/usr/lib/python3/dist-packages/vyos/config.py", line 238, in get_config_dict
    root_dict = self.get_cached_root_dict(effective)
  File "/usr/lib/python3/dist-packages/vyos/config.py", line 216, in get_cached_root_dict
    config_dict = json.loads(config.to_json())
  File "/usr/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.9/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.9/json/decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Invalid \escape: line 1 column 45303 (char 45302)



[[system login]] failed
Commit failed
[edit]

Details

Difficulty level
Unknown (require assessment)
Version
1.4-rolling-202204240217
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

ajgnet created this task.
ajgnet created this object in space S1 VyOS Public.

Working fine in VyOS 1.4-rolling-202204250217

[email protected]# set system login banner pre-login "======================================================================= \n=========================   NOTICE TO USERS   ========================= \n======================================================================= \n                                                                        \nThis is an official computer system and is private property. It is for  \nauthorized users only. Unauthorized users are prohibited. Users         \n(authorized or unauthorized) have no explicit or implicit expectation   \nof privacy. Any or all uses of this system may be subject to one or     \nmore of the following actions: interception, monitoring, recording,     \nauditing, inspection and disclosing to security personnel and law       \nenforcement personnel, as well as authorized officials of other         \nagencies, both domestic and foreign. By using this system, the user     \nconsents to these actions. Unauthorized or improper use of this system  \nmay result in administrative disciplinary action and civil and          \ncriminal penalties.                                                     \n                                                                        \nBy accessing this system you indicate your awareness of and consent to  \nthese terms and conditions of use.  Discontinue access immediately      \nif you do not agree to the conditions stated in this notice.            \n                                                                        \n======================================================================= \n"
[edit]
[email protected]# 
[email protected]# commit
[edit]
[email protected]#

Re-login:

% ssh [email protected]
======================================================================= 
=========================   NOTICE TO USERS   ========================= 
======================================================================= 
                                                                        
This is an official computer system and is private property. It is for  
authorized users only. Unauthorized users are prohibited. Users         
(authorized or unauthorized) have no explicit or implicit expectation   
of privacy. Any or all uses of this system may be subject to one or     
more of the following actions: interception, monitoring, recording,     
auditing, inspection and disclosing to security personnel and law       
enforcement personnel, as well as authorized officials of other         
agencies, both domestic and foreign. By using this system, the user     
consents to these actions. Unauthorized or improper use of this system  
may result in administrative disciplinary action and civil and          
criminal penalties.                                                     
                                                                        
By accessing this system you indicate your awareness of and consent to  
these terms and conditions of use.  Discontinue access immediately      
if you do not agree to the conditions stated in this notice.            
                                                                        
======================================================================= 

[email protected]'s password: 
Welcome to VyOS!

Check out project news at https://blog.vyos.io
and feel free to report bugs at https://phabricator.vyos.net

You can change this banner using "set system login banner post-login" command.

VyOS is a free software distribution that includes multiple components,
you can check individual component licenses under /usr/share/doc/*/copyright
Last login: Mon Apr 25 08:29:19 2022
[email protected]:~$ 
[email protected]:~$ 
[email protected]:~$