|
|
#1 |
|
PHP Mechanic
Join Date: Nov 2007
Posts: 118
Rep Power: 9 ![]() |
I'm seeing problems with this line in xss_clean():
Code:
$str = preg_replace('#(<[^>]+.*?)(onblur|onchange|onclick|onfocus|onload|onmouseover|onmouseup|onmousedown|onselect|onsubmit|onunload|onkeypress|onkeydown|onkeyup|onresize)[^>]*>#iU',"\\1>",$str);
Is anyone else seeing this? Symptom is that you create a formatted description (for, say a Seller Store) in TinyMCE, submit it, and it comes back blank. -- hugh |
|
|
|
|
|
#2 |
|
PHP Mechanic
Join Date: Nov 2007
Posts: 118
Rep Power: 9 ![]() |
I worked round the problem thusly:
Around line 764 in functions.php: Code:
// $$$ hugh - wrapped preg_match around the preg_replace, because the preg_replace
// return NULL on some perfectly valid inputs. So only run the replace if there is
// actually a js action in the string.
$js_re = '#(<[^>]+.*?)(onblur|onchange|onclick|onfocus|onload|onmouseover|onmouseup|onmousedown|onselect|onsubmit|onunload|onkeypress|onkeydown|onkeyup|onresize)[^>]*>#iU';
if (preg_match($js_re,$str)) {
$str = preg_replace($js_re,"\\1>",$str);
}
|
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 2 problems solved by change of Host. | Grebogreen | v3.1 Questions & Support | 5 | 06-24-2008 10:59 AM |
| Image upload problems... | Mikael | v3.1 Questions & Support | 13 | 02-22-2007 08:46 AM |
| Two problems | xaphid | v3.0 Questions & Support | 1 | 02-08-2007 02:31 PM |
| Problems with updateOrder function | flyingpylon | v3.1 Questions & Support | 3 | 11-06-2006 08:58 PM |
| If your having problems after an upgrade... From old forum | calaf6 | v3.0 Questions & Support | 0 | 03-30-2006 04:44 PM |