Single file upload plugin – Comment length bug Single file upload plugin – Comment length bug
 

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

Single file upload plugin – Comment length bug

Started by 406man, June 17, 2024, 10:43:48 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

406man

This bug affects comments when uploading an image using the single-file method. The multiple file option is not affected.

The length of a comment is truncated to 512 characters, ignoring the setting "Maximum length of a comment" in the gallery config.

The fault lies in codebase.php in the upload_sgl plugin where the comment length is hard-coded to be 512. It should use the config value $CONFIG['max_com_size']

Line 112 is:

<textarea name="caption" rows="5" cols="40" class="textinput" onkeydown="textCounter(this, 512);" onkeyup="textCounter(this, 512);"></textarea>

Corrected:

<textarea name="caption" rows="5" cols="40" class="textinput" onkeydown="textCounter(this, {$CONFIG['max_com_size']});" onkeyup="textCounter(this, {$CONFIG['max_com_size']});"></textarea>

I've made the change in my 1.6.26 gallery and it works fine.