Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Single file upload plugin – Comment length bug  (Read 50 times)

0 Members and 1 Guest are viewing this topic.

406man

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Posts: 55
Single file upload plugin – Comment length bug
« on: Yesterday at 10:43:48 am »

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.
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 20 queries.