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: issue when user edits own file  (Read 4335 times)

0 Members and 1 Guest are viewing this topic.

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
issue when user edits own file
« on: March 24, 2005, 09:49:10 pm »

(note from Thu: The following posts were split from another discussion on adding files to a public album)

Tranz,

the seems to be a problem.  I uploaded the 1.4. site, which seemed to go ok.  It told me it would show when approved.
After I uploaded the 1.3.2 site, I noticed the 1.4 site was showing, so I went to check it, and found the hyperlink was not working.

I went to edit the file info, found the problem and fixed it, but when I applied the changes the file disappeared, and I received an 'you are not allowed to access this page' error.  On going back to the album, the file appears to have been deleted.

Shall I re-submit?
« Last Edit: March 25, 2005, 05:21:47 am by TranzNDance »
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: gallery showcase
« Reply #1 on: March 24, 2005, 09:56:02 pm »

Hmmmm, a definate problem here.

I tried to edit the file info on my other submission, in the 1.3. showcase, and the same thing has happened.  So when a user edits the file info, the file appears to be delelted.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: gallery showcase
« Reply #2 on: March 24, 2005, 10:38:16 pm »

That is strange. I saw both your entries earlier. I had approved the first one. The second one didn't need approval since I assigned you to the VIP group which did not require approval.

I have this config " Allow users to retain control over their pics in public galleries" set to Yes. I don't know what could have happened. :(
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: gallery showcase
« Reply #3 on: March 24, 2005, 11:12:18 pm »

Casper, I just looked at your recent uploads page and it showed your 2 submissions. When I tried to view them, I got this:
Quote
Critical error
File is in a non existant album (0)!?

So it looks like they weren't deleted, but assigned to an album that can't be seen.

They also show up in the last uploads album, and top viewed
« Last Edit: March 24, 2005, 11:35:49 pm by TranzNDance »
Logged

Nibbler

  • Guest
Re: gallery showcase
« Reply #4 on: March 24, 2005, 11:26:55 pm »

Check $public_albums_list code in editonepic, it might not be filling the album box with public albums for non-admins.
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: issue when user edits own file
« Reply #5 on: March 24, 2005, 11:41:36 pm »

I was able to reproduce this on my local installation. After submitting an edit as nonadmin, I got this:
Quote
You don't have permission to access this page.

File: C:\wamp\websites\cpg-dev\editOnePic.php - Line: 212

This is what I have at line 212:
Code: [Select]
if (!(GALLERY_ADMIN_MODE || $CURRENT_PIC['category'] == FIRST_USER_CAT + USER_ID || ($CONFIG['users_can_edit_pics'] && $CURRENT_PIC['owner_id'] == USER_ID))) cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);
Observed the same behavior as Casper's files.
Logged

Nibbler

  • Guest
Re: issue when user edits own file
« Reply #6 on: March 24, 2005, 11:46:42 pm »

committed fix for files going to no album, cannot replicate permissions issue.
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: issue when user edits own file
« Reply #7 on: March 24, 2005, 11:57:42 pm »

Thank you, Nibbler. That fixed it so that nonadmin can edit own files.

Do the ones that have already been affected need to be manually changed in the database?

I can't see the files before the fix in editpics.
Logged

Nibbler

  • Guest
Re: issue when user edits own file
« Reply #8 on: March 24, 2005, 11:59:39 pm »

You'd need to manually give them them the desired aid.
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: issue when user edits own file
« Reply #9 on: March 25, 2005, 12:05:21 am »

I went into my local database and entered the album id. The problem file now shows up fine.

@casper, donnoman will have to update the gallery with the fix, and edit the database. So yay, you didn't need to resubmit. :)
Logged
Pages: [1]   Go Up
 

Page created in 0.095 seconds with 19 queries.