Project

General

Profile

Bug #24022

Encoding::UndefinedConversionError at failed hosts call

Added by Timo Goebel 5 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Category:
Host creation
Target version:
Difficulty:
Triaged:
No
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

When I issue

wget q -O --body-file=LICENSE --method POST --header="Content-Type: text/plain" http://localhost:3000/unattended/failed?token=689ba68a-a511-44b1-bca5-c8f3f1ff353e

I get this error:

Encoding::UndefinedConversionError ("\xE2" from ASCII-8BIT to UTF-8)

Maybe we need something like this:

.encode('utf-8', invalid: :replace, undef: :replace, replace: '_')

Or make sure we get the correct encoding in the first place.


Related issues

Related to Foreman - Feature #21007: Templates API to mark a build as failedClosed

Associated revisions

Revision 7e6c2dc8 (diff)
Added by Lukas Zapletal 5 months ago

Fixes #24022 - unattended error input is UTF-8 friendly (#5761)

History

#1 Updated by Timo Goebel 5 months ago

  • Related to Feature #21007: Templates API to mark a build as failed added

#2 Updated by Lukas Zapletal 5 months ago

  • Triaged set to No
  • Status changed from New to Need more information

Unable to repro with Foreman LICENSE file and sqlite3. Is this on postgresql?

#3 Updated by Lukas Zapletal 5 months ago

  • Status changed from Need more information to New

Oh reproduced!

#4 Updated by The Foreman Bot 5 months ago

  • Assignee set to Lukas Zapletal
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/5761 added

#5 Updated by Daniel Lobato Garcia 5 months ago

  • Legacy Backlogs Release (now unused) set to 353

#6 Updated by Daniel Lobato Garcia 5 months ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF