Opened 17 years ago

Closed 17 years ago

Last modified 15 years ago

#14067 closed defect (fixed)

livecheck.distname is not properly escaped in livecheck.regex

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: macports-tickets@…
Priority: Normal Milestone: MacPorts 1.7.0
Component: base Version: 1.7.0
Keywords: Cc:
Port:

Description

livecheck.distname is not being properly escaped before being put into livecheck.regex. I noticed this problem while trying to update the livecheck for osxvnc, setting livecheck.distname Vine Server(OSXvnc). With livecheck.check sourceforge, this results in the regex "<title>Vine Server(OSXvnc) (.*) released.*</title>" which is incorrect. The regex I wanted was "<title>Vine Server\(OSXvnc\) (.*) released.*</title>". There must be a Tcl function we can use which would properly escape a string for use in a regular expression, like preg_quote() in php.

Looking through all ports, I see that fixing this will break the livecheck in the portfiles for fusefs and spotlightfs, which currently assume this bug exists.

Change History (6)

comment:1 in reply to:  description Changed 17 years ago by afb@…

Replying to ryandesign@macports.org:

There must be a Tcl function we can use which would properly escape a string for use in a regular expression, like preg_quote() in php.

Doesn't look that way, but then again it isn't impossible to just add one either.

comment:2 Changed 17 years ago by raimue (Rainer Müller)

Fixed in r34667.

comment:3 Changed 17 years ago by raimue (Rainer Müller)

Resolution: fixed
Status: newclosed

comment:4 Changed 17 years ago by raimue (Rainer Müller)

Now really fixed in r34693, the previous commit broke other regexes.

comment:5 Changed 16 years ago by tobypeterson

Milestone: MacPorts base bugsMacPorts Future

Milestone MacPorts base bugs deleted

comment:6 Changed 15 years ago by jmroot (Joshua Root)

Milestone: MacPorts FutureMacPorts 1.7.0
Note: See TracTickets for help on using tickets.