Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-1461

Tokenizer splits values containing special characters during variable substitution

    Details

      Description

       

      <property name="pass_ok" value="myPassWith123#]@&amp;"/>
      <property name="pass_split" value="myPassWith123}]@&amp;"/>
      

      If you try using following passwords (e.g. in my case in DbAppender) first one will be substituted correctly and second one will result in following literal: myPassWith123

      Second password contains right curly brace which ch.qos.logback.core.subst.Tokenizer handles as a special token. I guess all special chars from method 

      Tokenizer#handleLiteralState(..) will result in the same behavior: $ : { }

      I couldn't figure out how to escape the values properly. Tried approach with escaping from Layout Patterns, didn't help.

        Attachments

          Activity

            People

            • Assignee:
              logback-dev Logback dev list
              Reporter:
              marek.sabo Marek Šabo
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: