dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
57af2ae
)
Fixed excessive memory usage in PCRE in wfMangleFlashPolicy(). Was causing OOM on...
author
Tim Starling
<tstarling@users.mediawiki.org>
Fri, 30 May 2008 14:58:29 +0000
(14:58 +0000)
committer
Tim Starling
<tstarling@users.mediawiki.org>
Fri, 30 May 2008 14:58:29 +0000
(14:58 +0000)
includes/OutputHandler.php
patch
|
blob
|
history
diff --git
a/includes/OutputHandler.php
b/includes/OutputHandler.php
index
b530b0a
..
2b3e9fa
100644
(file)
--- a/
includes/OutputHandler.php
+++ b/
includes/OutputHandler.php
@@
-102,7
+102,12
@@
function wfGzipHandler( $s ) {
* Mangle flash policy tags which open up the site to XSS attacks.
*/
function wfMangleFlashPolicy( $s ) {
* Mangle flash policy tags which open up the site to XSS attacks.
*/
function wfMangleFlashPolicy( $s ) {
- return preg_replace( '/\<\s*cross-domain-policy\s*\>/i', '<NOT-cross-domain-policy>', $s );
+ # Avoid weird excessive memory usage in PCRE on big articles
+ if ( preg_match( '/\<\s*cross-domain-policy\s*\>/i', $s ) ) {
+ return preg_replace( '/\<\s*cross-domain-policy\s*\>/i', '<NOT-cross-domain-policy>', $s );
+ } else {
+ return $s;
+ }
}
/**
}
/**