Project

General

Profile

Bug #19173

Updated by Nicolas CHARLES about 3 years ago

This issue won't be fixed in Rudder 6.x, as it would *break* existing installation of Rudder 
 However, it is fixed in Rudder 7.0, meaning that upgrades from 6.X to 7.0 may break values by escaping string escaped by hand 



 Brace yourself for this bug description. 

 Using multiple "\" in a class parameter leads to inconsistent behaviour 


 h2. Technique editor 

 |_.Number of \|_.Value|_.File edited|_.State of edition|_.Report|_.State of report| 
 | 1 | /tmp/escapedfilebyfileonlyone\s | /tmp/escapedfilebyfileonlyone\s |    OK | /tmp/escapedfilebyfileonlyone\s | OK | 
 | 2 | /tmp/escapedfilebyfiletwice\\s | /tmp/escapedfilebyfiletwice\s | NOK | /tmp/escapedfilebyfiletwice\s | NOK | 
 | 3 | /tmp/escapedfilebyfile\\\s | /tmp/escapedfilebyfile\\s | NOK | /tmp/escapedfilebyfile\\s | NOK | 

 and you get the idea for the rest 
 There is no escaping here, causing the \\ to be replaced by \ 
 Content in file, or commands is also unescaped, so \\ are replaced by \ 

 h2. Rudder built-in techniques 

 Used with Technique Check generic file content 

 |_.Number of \|_.Value|_.File edited|_.State of edition|_.Report|_.State of report| 
 | 1 | /tmp/file\sonce | /tmp/file\sonce |    OK | /tmp/file\sonce | OK | 
 | 2 | /tmp/file\\stwice | /tmp/file\\stwice | OK | /tmp/file\\stwice | OK | 
 | 3 | /tmp/file\\\sthrice | 'file\\\sthrice'| OK | /tmp/escapedfilebyfile\\\s | OK | 

 There is escaping here, with \\ being replaced by \\\\, and so it ends up correct both in the file name and in the report 


Back