Closed (fixed)
Project:
Ubercart
Version:
6.x-2.0-beta3
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
2 Feb 2009 at 00:05 UTC
Updated:
20 Feb 2009 at 14:20 UTC
Jump to comment: Most recent file
When ubercart is used in a service-based context with paid subscriptions to files, the bug comes into play when multiple users are registered.
If one paid user accesses their purchase and downloads the file (in say an arbitrary 50 download limit), this completely removes that same file access to all other paid users across the board. The file simply disappears on all the other user accounts.
I have reproduced this on clean installations on separate servers with varying versions.
This bug is reproducible with Drupal 6.8 & 6.9 and Ubercart 6.x-2.0-beta3 (and beta2).
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | uc_file.record.patch | 536 bytes | cha0s |
| #3 | uc_files.patch | 796 bytes | jody lynn |
Comments
Comment #1
cha0s commentedStrange, I thought that could only happen if somehow they would have had the same file_key generated, but that's pretty unlikely (although I suppose, possible). I'll get this fixed very soon!
Comment #2
ibuprofen commentedWell actually, I've noticed that they don't have the same file_key. They are different which is why I've been scratching my head at this for awhile (I've made several attempts to fix this before I posted a bug report). Yet it STILL drops access to the same file across the other users' paid accounts as well.
If I can be of any assistance please let me know.
Comment #3
jody lynnReally bad bug!
Untested fix attached.
Comment #4
jody lynnPatch fixes the problem on our site.
Comment #5
jody lynnAfter applying the patch I fixed our existing file orders by running the following php (I used batches of 100 orders and changed the WHERE statement each time):
Comment #6
cha0s commentedThanks a lot for that, Jody Lynn. The fix is correct, I can't believe that wasn't found until now...
Comment #7
cha0s commentedI see now, the reason I didn't see a problem in my local is because I had the patch applied that I posted here: http://www.ubercart.org/files/uc_file.2.x.patch
I have attached a patch that is more appropriate.
Comment #8
yesct commentedI just, just, got the latest 2.x dev from bazar and it does not have this patch.
line 341 still reads:
Did this patch still need to be committed?
Comment #9
rszrama commentedYeah, hence the status. When it's committed, it'll be moved to fixed. ; )
Comment #10
Island Usurper commentedI know why this issue wasn't found for a while. It's really hard to think about testing how multiple users will affect things when you're only one person. ;) And that probably explains why I've taken so long to review this patch.
Committed now.