Needs review
Project:
FlashVideo
Version:
6.x-1.5
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 May 2010 at 04:27 UTC
Updated:
29 May 2010 at 09:33 UTC
So I noticed that flashvideo_convert is passing token_replace the $account variable...
This works fine if 'Convert video immediately' is set, but if video conversions are happening on cron, $account is going to be whoever initiated the cron (usually Anonymous?)
We also have the uid of the owner of the file available in this context though, and chances are pretty good that the initial token_replace call used their account, so how about we pass that account into token_replace instead?
Here's a patch to that effect:
| Comment | File | Size | Author |
|---|---|---|---|
| flashvideo-use_owner_tokens-1.patch | 906 bytes | Vector- |
Comments
Comment #1
Vector- commentedComment #2
Vector- commentedRenaming / reclassifying this issue to be more appropriate...
This feels like a bug to me, we know the owner, we give them ownership of the thumb and converted video, we should generate tokens accordingly.
Incidentally, this allows the sorting of uploaded videos into user directories...
Follow-up work on flashvideo_import and FileField paths may be found here:
#812562: Making flashvideo_import respect FileField path settings for original video
Comment #3
trungonly commentedSame problem for me. The variable $account was never defined. So it uses token for current cron user, this is not corrrect.
Vector's patch is good this case.
Please fix this bug, thanks.