Forbidden characters not getting replaced Forbidden characters not getting replaced
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Forbidden characters not getting replaced

Started by Abbas Ali, September 19, 2005, 10:36:29 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Abbas Ali

In the function replace_forbidden in functions.inc.php the code


preg_match_all("#$mb_utf8_regex".'|[\x00-\x7F]#', $chars, $forbidden_chars);


gives a 2D array in $forbidden_chars and hence


str_replace($forbidden_chars, '_', $str);


was not working and forbidden chars were not being replaced with "_"

Modified the code accordingly and committed to devel version. Please confirm.

[Edit]
Added space and ampersand for forbiden_fname_char in insert query (basic.sql) and added an update query for the same in update.sql
[/Edit]
Chief Geek at Ranium Systems

Joachim Müller

haven't checked, but this sounds like very good work.

artistsinhawaii

Learn and live ... In January of 2011, after a botched stent attempt, the doctors told me I needed a multiple bypass surgery or I could die.  I told them I needed new doctors.

Joachim Müller

needs confirmation before being marked as fixed - Abbas requested a dev confirm his fix.

artistsinhawaii

Ah!  sorry,
I thought this was tied in to the other forbidden character issues that were just fixed.


Dennis
Learn and live ... In January of 2011, after a botched stent attempt, the doctors told me I needed a multiple bypass surgery or I could die.  I told them I needed new doctors.

Abbas Ali

Yes this was partly tied to the Spaces in filenames issue issue which has been fixed now.

Marking this thread as fix.
Chief Geek at Ranium Systems