Project

General

Profile

Actions

Bug #4381

closed

Special characters (ie, accents such as éèùô) are replaced by "?" in CFEngine promises

Added by Jonathan CLARKE almost 11 years ago. Updated over 10 years ago.

Status:
Released
Priority:
3
Category:
Web - Config management
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

If special characters (such as accents, like é) are entered into a Directive variable, the special characters are replaced by "?".

I entered "Ceci est un mot accentué (héhéhé !)", after making sure my browser was in UTF-8. This came out in promises as "Ceci est un mot accentu? (h?h?h? !)"

I checked LDAP content and it has the right accents:

directiveVariable:: R0VORVJJQ19GSUxFX0NPTlRFTlRfUEFZTE9BRFswXTpDZWNpIGVzdCB1bi
 Btb3QgYWNjZW50dcOpIChow6low6low6kgISk=

# echo "R0VORVJJQ19GSUxFX0NPTlRFTlRfUEFZTE9BRFswXTpDZWNpIGVzdCB1bi
>  Btb3QgYWNjZW50dcOpIChow6low6low6kgISk=" | openssl base64 -d
GENERIC_FILE_CONTENT_PAYLOAD[0]:Ceci est un mot accentué (héhéhé !)

I saw this on 2.9.2 but I'm assuming it also happens since older versions.


Related issues 1 (0 open1 closed)

Related to Rudder - Bug #4393: The default disclaimer message loaded initially into LDAP has an invalid charachter in itReleasedFrançois ARMAND2014-01-17Actions
Actions #1

Updated by Nicolas CHARLES almost 11 years ago

on my dev system, it works out well
Could it be a local problem on the system ? I remember that the local is kinda defined in Jetty

Actions #2

Updated by Jonathan CLARKE almost 11 years ago

Nicolas CHARLES wrote:

on my dev system, it works out well
Could it be a local problem on the system ? I remember that the local is kinda defined in Jetty

I have no idea. If you don't see it on your dev system, then please reproduce it on a standard installation. I saw this using a simple rudder-snapshot installation.

What we need to know is which component is introducing the "?". I tried to figure this out, but I can only get as far as "it's OK in LDAP", so now I can't analyze this any further, since the next step is in Scala code. Can you continue that analysis please?

Actions #3

Updated by Nicolas CHARLES almost 11 years ago

Tried on rudder-snapshot

The locale defined in /etc/jetty is export LANG=C

In logs and generated promises, héhéhé becomes h?h?h?

Changing in /etc/jetty to

export LANG=en_US.UTF-8

correct both the logs and the generated promises.

Actions #4

Updated by Nicolas CHARLES almost 11 years ago

Ok, the right solution is to set this property in /etc/default/jetty

-Dfile.encoding=UTF-8

for Java

Actions #5

Updated by Jonathan CLARKE almost 11 years ago

  • Status changed from 8 to Pending technical review
  • Assignee set to Nicolas CHARLES

Thanks for investigating Nicolas! I "pull requested" your solution: https://github.com/Normation/rudder-packages/pull/210. Please review.

Actions #6

Updated by Jonathan CLARKE almost 11 years ago

  • Status changed from Pending technical review to Pending release
  • % Done changed from 0 to 100

Applied in changeset packages:commit:c2331d472c2e687e57b6953df1724c33cc4b7735.

Actions #7

Updated by Nicolas CHARLES almost 11 years ago

Applied in changeset packages:commit:678491630d69f9509d4d324782325d5b32ecdbe9.

Actions #8

Updated by Vincent MEMBRÉ almost 11 years ago

  • Target version changed from 2.6.10 to 2.6.11
Actions #9

Updated by Vincent MEMBRÉ over 10 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 2.6.11, which was released today.
Check out:

Actions

Also available in: Atom PDF