Bug #2285

VM template unescape function eats all backslashes

Added by Vlastimil Holer almost 8 years ago. Updated over 7 years ago.

Status:ClosedStart date:08/28/2013
Priority:NormalDue date:
Assignee:Carlos Martín% Done:

0%

Category:Core & System
Target version:Release 4.4
Resolution:fixed Pull request:
Affected Versions:OpenNebula 4.2

Description

Bug in unescape function in src/template/template_syntax.cc causes all backslashes in VM template to be eaten by parser
https://github.com/OpenNebula/one/blob/one-4.2/src/template/template_syntax.cc#L1881

For example:
\\\"
is reduced only to
"

It's impossible to create a context variable containing \" sequence on target host
VAR="\\\""

echo $VAR
\" <----- I want to see this!

Associated revisions

Revision 59f9e09a
Added by Carlos Martín over 7 years ago

Bug #2285: unescape only eats one backslash

Revision c1d86c3c
Added by Ruben S. Montero over 7 years ago

Bug #2285: redo parsers

Revision e5cf19d1
Added by Carlos Martín over 7 years ago

Bug #2285: unescape only eats one backslash

(cherry picked from commit 59f9e09aac019c44bfa1a1d4da637b7a819cf4e0)

Revision 1a91738f
Added by Ruben S. Montero over 7 years ago

Bug #2285: redo parsers

(cherry picked from commit c1d86c3c188a7678734ce8a8c03e98b600154da2)

History

#1 Updated by Carlos Martín almost 8 years ago

  • Status changed from Pending to Assigned
  • Assignee set to Carlos Martín
  • Target version set to Release 4.4

#2 Updated by Ruben S. Montero over 7 years ago

  • Status changed from Assigned to Closed
  • Resolution set to fixed

Also available in: Atom PDF