[Touch-packages] [Bug 1857733] Re: MOTD "safe_print" prints control characters

2019-12-30 Thread Steve Langasek
** Changed in: base-files (Ubuntu)
   Importance: Undecided => Wishlist

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to base-files in Ubuntu.
https://bugs.launchpad.net/bugs/1857733

Title:
  MOTD "safe_print" prints control characters

Status in base-files package in Ubuntu:
  New

Bug description:
  /etc/update-motd.d/50-motd-news contains a function called
  "safe_print". Its documentation says it does not print control
  characters, but this is false. If you look at the `tr` command it
  prints \012 (Device Control 2 aka. DC2 aka. ␒) and \015 (Negative
  Acknowledge aka. NAK aka. ␕) from the source. I don't know why it
  would do that, or whether it could possibly be a security issue,
  especially since it makes the code more complex than it should be (`tr
  -d '\000-\011\013\014\016-\037'` vs `tr -d '\000-\037'`). A quick
  `/etc/update-motd.d/50-motd-news --force | grep $'\x12\|\x15'`
  returned exit code 1, so it's not part of the current MOTD.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/base-files/+bug/1857733/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1857733] Re: MOTD "safe_print" prints control characters

2019-12-27 Thread Victor Engmark
Correction: That's of course *octal* 012 and 015, aka. Line Feed and
Carriage Return. That should probably be explicit in the documentation.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to base-files in Ubuntu.
https://bugs.launchpad.net/bugs/1857733

Title:
  MOTD "safe_print" prints control characters

Status in base-files package in Ubuntu:
  New

Bug description:
  /etc/update-motd.d/50-motd-news contains a function called
  "safe_print". Its documentation says it does not print control
  characters, but this is false. If you look at the `tr` command it
  prints \012 (Device Control 2 aka. DC2 aka. ␒) and \015 (Negative
  Acknowledge aka. NAK aka. ␕) from the source. I don't know why it
  would do that, or whether it could possibly be a security issue,
  especially since it makes the code more complex than it should be (`tr
  -d '\000-\011\013\014\016-\037'` vs `tr -d '\000-\037'`). A quick
  `/etc/update-motd.d/50-motd-news --force | grep $'\x12\|\x15'`
  returned exit code 1, so it's not part of the current MOTD.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/base-files/+bug/1857733/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp