Project

General

Profile

Bug #1768

mod_ssi doesn't accept single quotes

Added by Anonymous over 9 years ago. Updated over 1 year ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
mod_ssi
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Missing in 1.5.x:
No

Description

Recently moved a site from Apache to lighttpd. The only problem was the fact that lighttpd refused to interpret our SSI includes, which use single quotes, as so:

<!--#include virtual='/includes/head.txt' -->

A sed script was the solution for now, but I think it should be considered to allow the use of single quotes in SSI.

-- mwild1

Associated revisions

Revision a5fcfee6 (diff)
Added by gstrauss over 1 year ago

[mod_ssi] more flexible quoting (fixes #1768)

allow double-quotes, single-quotes or no quote on SSI param values

remove use of PCRE from mod_ssi

fix misspelling of 'unknow' to be 'unknown'

x-ref:
"mod_ssi doesn't accept single quotes"
https://redmine.lighttpd.net/issues/1768

History

#1

Updated by stbuehler about 9 years ago

  • Status changed from New to Fixed
  • Resolution set to wontfix

Here is the regular expression the ssi commands are "parsed" with:


<!--#([a-z]+)\\s+(?:([a-z]+)=\"(.*?)(?<!\\\\)\"\\s*)?(?:([a-z]+)=\"(.*?)(?<!\\\\)\"\\s*)?-->

I don't see how to allow single quotes there... sry. And we will not rewrite mod_ssi for 1.4, ssi isn't worth that imho.

If you have a regex which gives the same result and accepts single quotes just post it :)

#2

Updated by stbuehler about 9 years ago

  • Status changed from Fixed to Wontfix
#3

Updated by marc about 8 years ago

  • Status changed from Wontfix to Reopened
  • Assignee set to stbuehler
  • Target version changed from 1.4.21 to 1.4.24

The following regular expression would match with both "(double) and '(simple) quotes:

<!--#([a-z]+)\\s+(?:([a-z]+)=[\"\'](.*?)(?<!\\\\)[\"\']\\s*)?(?:([a-z]+)=[\"\'](.*?)(?<!\\\\)[\"\']\\s*)?-->
#4

Updated by stbuehler about 8 years ago

  • Status changed from Reopened to Need Feedback
  • Target version changed from 1.4.24 to 1.4.x
  • Missing in 1.5.x set to No

You forget that the start quote must be the same as the end quote, and that you should allow the other quote as content.

#5

Updated by stbuehler about 8 years ago

  • Status changed from Need Feedback to Wontfix
  • Assignee deleted (stbuehler)
  • Target version deleted (1.4.x)
#6

Updated by gstrauss over 1 year ago

  • Status changed from Wontfix to Patch Pending
  • Target version set to 1.4.40
#7

Updated by gstrauss over 1 year ago

  • Status changed from Patch Pending to Fixed
  • % Done changed from 0 to 100

Also available in: Atom