Project

General

Profile

Actions

Bug #24364

closed

Logs module unable to return non-ASCII characters

Added by Lukas Zapletal about 6 years ago. Updated almost 6 years 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 1 (0 open1 closed)

Has duplicate Smart Proxy - Bug #24028: character conversion error when calling '/logs' on foreman-proxyDuplicateIvan NecasActions
Actions #1

Updated by The Foreman Bot about 6 years ago

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

Updated by Daniel Lobato Garcia about 6 years ago

  • Target version set to 890
Actions #3

Updated by Lukas Zapletal about 6 years ago

  • Status changed from Ready For Testing to Closed
Actions #4

Updated by The Foreman Bot about 6 years ago

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

Updated by The Foreman Bot about 6 years ago

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

Updated by Lukas Zapletal about 6 years ago

  • Fixed in Releases added
  • Found in Releases 1.15.4 added
Actions #7

Updated by Lukas Zapletal about 6 years ago

  • Fixed in Releases added
Actions #8

Updated by Lukas Zapletal about 6 years 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.

Actions #9

Updated by Adam Ruzicka about 6 years ago

  • Bugzilla link set to 1615439
Actions #10

Updated by Ewoud Kohl van Wijngaarden about 6 years 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 ()
Actions #11

Updated by Ivan Necas almost 6 years ago

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

Updated by Tomer Brisker almost 6 years ago

  • Target version deleted (1.20.0)
Actions

Also available in: Atom PDF