Problem with Russian keywords in editpics.php Problem with Russian keywords in editpics.php
 

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

Problem with Russian keywords in editpics.php

Started by croft79, August 10, 2017, 04:03:41 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

croft79

Good day
When I'm uploading file with Russian keywords they are disappearing in editpics.php step and I have only (2016, C,M,Pоза ,,,,,,).  :-\

Samples in attachment

Αndré

Please attach a sample file which contain such keywords. I assume this are IPTC keywords?

croft79


Αndré

The function strip_IPTC in include/iptc.inc.php is responsible for that (mal)function:
$data=htmlentities(strip_tags(trim($data,"\x7f..\xff\x0..\x1f")),ENT_QUOTES); //sanitize data against sql/html injection; trim any nongraphical non-ASCII character:

This may be reviewed, but it needs to be done carefully to not open any security vulnerabilities.

Αndré

This will fix the issue:
Code (include/iptc.inc.php) Select
$data=htmlentities(strip_tags(trim($data,"\x7f\x0..\x1f")),ENT_QUOTES); //sanitize data against sql/html injection; trim ASCII control characters

I assume it won't have a security impact, but I haven't checked that in detail.