<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [v220 regression] "Failed to unescape command line""
   href="https://bugs.freedesktop.org/show_bug.cgi?id=90794#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [v220 regression] "Failed to unescape command line""
   href="https://bugs.freedesktop.org/show_bug.cgi?id=90794">bug 90794</a>
              from <span class="vcard"><a class="email" href="mailto:fdo@zonque.org" title="Daniel Mack <fdo@zonque.org>"> <span class="fn">Daniel Mack</span></a>
</span></b>
        <pre>It seems this broke with commit 527b7a42 ("util: rework cunescape(), improve
error handling"). As load-fragment.c does not pass the UNESCAPE_RELAX flag to
cunescape(), the code now errors out in the attempt of unescaping the quoted
perl regexp '\w+@\K[\d.]+', which it didn't before. As this is clearly a
regression from an older version of systemd, I guess the best we can do is to
restore the old behavior and gracefully handles unescaping errors by copying
the characters verbatim that cannot be unescaped.

Lennart, any reason why you omitted this flag for that specific use case?

My proposed fix would be:

diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
index c95c110..df5fe6f 100644
--- a/src/core/load-fragment.c
+++ b/src/core/load-fragment.c
@@ -610,7 +610,7 @@ int config_parse_exec(
                         else
                                 skip = strneq(word, "\\;", MAX(l, 1U));

-                        r = cunescape_length(word + skip, l - skip, 0, &c);
+                        r = cunescape_length(word + skip, l - skip,
UNESCAPE_RELAX, &c);
                         if (r < 0) {
                                 log_syntax(unit, LOG_ERR, filename, line, r,
"Failed to unescape command line, ignoring: %s", rvalue);
                                 r = 0;</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>