Menu

#363 Issue with source-code like string and the 'to_string()' function

v1.1.x
fixed
critical (96)
v1.1.0
Bug Fix
2018-11-11
2018-08-07
Erik Hänel
No

If one uses source-code like syntax with quotation marks inside in a script like

"error('Falsches Format für den Parameter \"messungstyp\"!');"

The to_string() function seems to have issues, because it tries to convert the escaped quotation marks into something like \\ ".

Analysis:

There are two changes necessary: the implementation of the to_string() function is erroneous and additionally the function addMaskedStrings() also adds unnecessary escaped backslashes.

Implementation:

  • Implementation: The fix was implemented as proposed by the analysis.
  • Revision: [r375]
  • Implementation test: The to_string() function was applied to the example string without any deviation

Documentation:

  • ChangesLog: updated
  • Comments: Comments were added where necessary
  • Documentation articles: Not needed - bug fix
  • Language files: Not needed - bug fix

Tests:

This fix was tested in the automatic SW tests. No deviations detected.

Related

Commit: [r375]

Discussion

  • Erik Hänel

    Erik Hänel - 2018-08-08
    • labels: --> critical
    • status: open --> accepted
     
  • Erik Hänel

    Erik Hänel - 2018-08-08
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -3,3 +3,20 @@
         "error('Falsches Format für den Parameter \"messungstyp\"!');"
    
     The `to_string()` function seems to have issues, because it tries to convert the escaped quotation marks into something like `\\ "`.
    +
    +###Analysis:
    +(*Describe, what's the issue and which changes have to be made*)
    +
    +###Implementation:
    +* Implementation: (*Describe, what you've changed*) 
    +* Revision: [rXXX]
    +* Implementation test: (*Describe the type of test, which you performed, and if it was succesful*)
    +
    +###Documentation:
    +* ChangesLog: (*Have you updated the changes log?*)
    +* Comments: (*Have you written comments in the code, which describe your change?*)
    +* Documentation articles: (*Have you updated the documentation articles?*)
    +* Language files: (*Have you updated the language files?*)
    +
    +###Tests:
    +(*Describe, which tests you performed and their outcome*)
    
    • status: accepted --> analyzing
     
  • Erik Hänel

    Erik Hänel - 2018-08-08
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -5,7 +5,7 @@
     The `to_string()` function seems to have issues, because it tries to convert the escaped quotation marks into something like `\\ "`.
    
     ###Analysis:
    -(*Describe, what's the issue and which changes have to be made*)
    +There are two changes necessary: the implementation of the  `to_string()` function is erroneous and additionally the function `addMaskedStrings()` also adds unnecessary escaped backslashes.
    
     ###Implementation:
    
     * Implementation: (*Describe, what you've changed*) 
    
    • status: analyzing --> implementing
     
  • Erik Hänel

    Erik Hänel - 2018-08-08
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -8,15 +8,15 @@
     There are two changes necessary: the implementation of the  `to_string()` function is erroneous and additionally the function `addMaskedStrings()` also adds unnecessary escaped backslashes.
    
     ###Implementation:
    -* Implementation: (*Describe, what you've changed*) 
    -* Revision: [rXXX]
    -* Implementation test: (*Describe the type of test, which you performed, and if it was succesful*)
    +* Implementation: The fix was implemented as proposed by the analysis.
    +* Revision: [r375]
    +* Implementation test: The `to_string()` function was applied to the example string without any deviation
    
     ###Documentation:
    -* ChangesLog: (*Have you updated the changes log?*)
    -* Comments: (*Have you written comments in the code, which describe your change?*)
    -* Documentation articles: (*Have you updated the documentation articles?*)
    -* Language files: (*Have you updated the language files?*)
    +* ChangesLog: updated
    +* Comments: Comments were added where necessary
    +* Documentation articles: Not needed - bug fix
    +* Language files: Not needed - bug fix
    
     ###Tests:
     (*Describe, which tests you performed and their outcome*)
    
    • status: implementing --> testing
     

    Related

    Commit: [r375]

  • Erik Hänel

    Erik Hänel - 2018-11-11
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -19,4 +19,4 @@
    
     * Language files: Not needed - bug fix
    
     ###Tests:
    -(*Describe, which tests you performed and their outcome*)
    +This fix was tested in the automatic SW tests. No deviations detected.
    
    • status: testing --> fixed
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB