https://redmine.lighttpd.net/https://redmine.lighttpd.net/favicon.ico?13667327412022-11-21T12:13:50Zlighty labsLighttpd - Bug #3175: configuration parse bughttps://redmine.lighttpd.net/issues/3175?journal_id=134072022-11-21T12:13:50Zgstrauss
<ul><li><strong>Subject</strong> changed from <i>lighttpd 1.4.67 configuration parse bug</i> to <i>configuration parse bug</i></li></ul><blockquote>
<p>If you pass a file with the wrong contents as an argument here, you will have problems [...]</p>
</blockquote>
<p>If the configuration is invalid, then the configuration is invalid, and the problem is that the configuration is invalid.<br />lighttpd rejects invalid configurations.</p>
<p>In the case you reported, lighttpd crashes while parsing an invalid configuration.<br />Instead, lighttpd should report the invalid configuration and then should exit non-zero.</p>
<p>A minimal config which triggers the configuration parser error:<br /><code>$HTTP["url"] =~ HTTP { }</code></p> Lighttpd - Bug #3175: configuration parse bughttps://redmine.lighttpd.net/issues/3175?journal_id=134082022-11-21T12:59:00Zgstrauss
<ul></ul><pre>
--- a/src/configparser.y
+++ b/src/configparser.y
@@ -737,7 +737,7 @@ context ::= DOLLAR SRVVARNAME(B) LBRACKET stringop(C) RBRACKET cond(E) expressio
B = NULL;
buffer_free(C);
C = NULL;
- D->fn->free(D);
+ if (D) D->fn->free(D);
D = NULL;
}
</pre> Lighttpd - Bug #3175: configuration parse bughttps://redmine.lighttpd.net/issues/3175?journal_id=134092022-11-21T13:13:30Zgstrauss
<ul><li><strong>Category</strong> set to <i>core</i></li><li><strong>Status</strong> changed from <i>New</i> to <i>Patch Pending</i></li><li><strong>Target version</strong> changed from <i>1.4.xx</i> to <i>1.4.68</i></li></ul> Lighttpd - Bug #3175: configuration parse bughttps://redmine.lighttpd.net/issues/3175?journal_id=134112022-11-23T15:15:07Zgstrauss
<ul><li><strong>Status</strong> changed from <i>Patch Pending</i> to <i>Fixed</i></li></ul><p>Applied in changeset <a class="changeset" title="[core] fix crash for invalid lighttpd.conf (fixes #3175) (thx dhjeong2) x-ref: "configuration..." href="https://redmine.lighttpd.net/projects/lighttpd/repository/14/revisions/3c92c959902c50f8ea6fa97d615a78e3ad60616c">3c92c959902c50f8ea6fa97d615a78e3ad60616c</a>.</p>