Modify ↓
#12181 closed defect (fixed)
Traceback in logs after page delete
Reported by: | Ryan J Ollos | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Milestone: | plugin - spam-filter |
Component: | plugin/spamfilter | Version: | |
Severity: | normal | Keywords: | |
Cc: | stoecker | Branch: | |
Release Notes: |
Patterns on |
||
API Changes: | |||
Internal Changes: |
Description
2015-08-22 05:51:56,292 Trac[main] ERROR: Internal Server Error: Traceback (most recent call last): File "build/bdist.linux-i686/egg/trac/web/main.py", line 551, in _dispatch_request dispatcher.dispatch(req) File "build/bdist.linux-i686/egg/trac/web/main.py", line 244, in dispatch resp = chosen_handler.process_request(req) File "build/bdist.linux-i686/egg/trac/wiki/web_ui.py", line 161, in process_request self._do_delete(req, versioned_page) File "build/bdist.linux-i686/egg/trac/wiki/web_ui.py", line 276, in _do_delete page.delete(version, db) File "build/bdist.linux-i686/egg/trac/wiki/model.py", line 122, in delete listener.wiki_page_version_deleted(self) File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/TracSpamFilter-1.0.6.dev0-py2.6.egg/tracspamfilter/filters/regex.py", line 88, in wiki_page_changed self._load_patterns(page) File "/srv/trac-hacks.org/pve/lib/python2.6/site-packages/TracSpamFilter-1.0.6.dev0-py2.6.egg/tracspamfilter/filters/regex.py", line 101, in _load_patterns self.patterns = [re.compile(p.strip()) for p in lines if p.strip()] File "/usr/lib/python2.6/re.py", line 190, in compile return _compile(pattern, flags) File "/usr/lib/python2.6/re.py", line 245, in _compile raise error, v # invalid expression error: multiple repeat
I'll investigate the cause.
Attachments (0)
Change History (3)
comment:1 by , 9 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 9 years ago
Cc: | added |
---|
comment:3 by , 9 years ago
Release Notes: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Fixed in [14827,14828,14832].
Note:
See TracTickets
for help on using tickets.
An error will be raised when modifying (create/save/delete/delete version) a wiki page that contains a regex that can't be compiled. The error is raised in an
IWikiChangeListener
method, after the page has been modified: plugins/1.0/spam-filter/tracspamfilter/filters/regex.py@14824:98#L94.This has been the behavior since the plugin was published in r3151.
We should validate the page content in an implementation of
IWikiPageManipulator
, so that the page can't be saved with an invalid regex.