Project

General

Profile

Bug #24364

Logs module unable to return non-ASCII characters

Added by Lukas Zapletal 4 months ago. Updated 25 days ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
-

Description

1) Start a proxy (upstream develop branch is affected as well):
2) Have "logs" module enabled
3) Send arbitrary binary data via TCP plain connection to HTTP endpoint: nc localhost 8448 < /usr/bin/bash
4) Call logs API: curl-proxy /logs

D, [2018-07-24T09:58:14.814774 ] DEBUG -- : "\xB0" from ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError)
/home/lzap/work/smart-proxy/modules/logs/logs_api.rb:15:in `encode'
/home/lzap/work/smart-proxy/modules/logs/logs_api.rb:15:in `to_json'
/home/lzap/work/smart-proxy/modules/logs/logs_api.rb:15:in `block in <class:LogsApi>'


Related issues

Has duplicate Smart Proxy - Bug #24028: character conversion error when calling '/logs' on foreman-proxyDuplicate

Associated revisions

Revision 4f09154e (diff)
Added by Lukas Zapletal 4 months ago

Fixes #24364 - non-ascii logs are readable now

History

#1 Updated by The Foreman Bot 4 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/smart-proxy/pull/596 added

#2 Updated by Daniel Lobato Garcia 4 months ago

  • Target version set to 890

#3 Updated by Lukas Zapletal 4 months ago

  • Status changed from Ready For Testing to Closed

#4 Updated by The Foreman Bot 4 months ago

  • Pull request https://github.com/theforeman/smart-proxy/pull/597 added

#5 Updated by The Foreman Bot 4 months ago

  • Pull request https://github.com/theforeman/smart-proxy/pull/598 added

#6 Updated by Lukas Zapletal 4 months ago

  • Found in Releases 1.15.4 added
  • Fixed in Releases added

#7 Updated by Lukas Zapletal 4 months ago

  • Fixed in Releases added

#8 Updated by Lukas Zapletal 3 months ago

For Katello there are some steps required in order to reproduce:

1) Make sure that HTTP endpoint is enabled (to do that install templates plugin):

:http_port: 8000

2) Send some UTF-8 decoder unfriendly data TO PORT 8000 (not 9090 that's HTTPS and the stack will refuse to pass this into the app)

nc localhost 8000 < /usr/bin/bash

3) Then access logs remotely:

  1. curl -s --cert /etc/foreman/client_cert.pem --key /etc/foreman/client_key.pem --cacert /etc/foreman/proxy_ca.pem https://$(hostname):9090/logs
    "\xE1" from ASCII-8BIT to UTF-8

Formatting is slightly different but apparently the bug is there. When you turn on DEBUG the message will be pretty clear.

#9 Updated by Adam Ruzicka 3 months ago

  • Bugzilla link set to 1615439

#10 Updated by Ewoud Kohl van Wijngaarden 3 months ago

  • Target version changed from 890 to 1.20.0
  • Fixed in Releases 1.18.1, 1.19.0, 1.20.0 added
  • Fixed in Releases deleted ()

#11 Updated by Ivan Necas 2 months ago

  • Has duplicate Bug #24028: character conversion error when calling '/logs' on foreman-proxy added

#12 Updated by Tomer Brisker 25 days ago

  • Target version deleted (1.20.0)

Also available in: Atom PDF