Closed (fixed)
Project:
Video
Version:
6.x-4.2-alpha2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Aug 2010 at 13:36 UTC
Updated:
21 Dec 2010 at 06:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
hypertext200video module only support for public videos, if need private videos then you should create private URL and its not done with the video_s3 module.
Comment #2
hypertext200Comment #3
Milan0 commentedI did a crude implementation of S3 query authentication.
Its actually already included in the S3.class and requires a few simple lines to get it working.
I wanted to make it onfigurable and submit it for dev review, why would we not want this feature in video module, i don't understand ?
It just adds a lifetime to your URL's...the urls will be working for everyone.
It's not only for private video sites, but it also prevents hotlinking from other hosts to your Amazon vids
Comment #4
hypertext200I will add it with the next release of the video module, meanwhile if you can provide a patch on this, it is better for the community.
Comment #5
Milan0 commentedSorry, i was planning to, was ill for a couple of weeks :(
I will tidy it up, make it admin configurable, and put it in a patch somewhere before wednesday.
Comment #6
ppcc commentedIf you're using Flowplayer, and trying to do something like limit access to videos to registered users you might want to take a look at this blog post:
http://evolt.org/s3secure
Comment #7
Milan0 commentedno need to do this in player deep level.
Official S3.class.php is used by the amazon_s3 part of the video module, so the functiobality is already available.
Will submit a patch soon
Comment #8
Milan0 commentedIf database changes are needed for strong new variables, do i patch the schema of the video s3 module, or do i provide a video_update_xxxx in the video module?
Comment #9
hypertext200I think you do not need any database changes, what you need to do is get the existing public url and append the params in to that URL, that will work.
Comment #10
Milan0 commentedYes, but i want to make it configurable 'enable authentication url' and a configurable url lifetime in seconds.
Comment #11
Milan0 commentednever mind, stored in variables obviously :D
Comment #12
patkai commentedIn the meantime can you please tell what did you patch? I need all videos private, so I guess I could change video_s3_video_load hook in video_s3.module.php?
Comment #13
Milan0 commentedshould be right, tested out fine on latest dev version.
Added gracetime so browsers will keep caching the same file (url does not change for lifetime interval).
Please review!
Comment #14
Milan0 commentedthis change is needed for it to work with flowplayer
in video_formatter.inc
line 143
change to
to perform url encoding on the passed URL
Comment #15
hypertext200Fixed in dev.
Comment #16
Milan0 commentedNot going to work
in amazon_s3.inc
you need to put the file as ACL_PRIVATE when you enable private for S3..
If you don't do this, the file can be accessed without adding the additional params.
http://www.s3maphor3.org/files/The_ultimate_PHP_guide-to_the_Amazon_S3_s...
[code]
Reminder: Set the ACL of your S3 files to private, otherwise there is no point in using signed URLs.
[/code]
I also don't get why you didn't add the gracetime functionality i've added to the code.
Comment #17
Milan0 commentedComment #18
hypertext200Fixed in dev.
Comment #19
hypertext200Comment #20
copeasetic commentedThis issue is back with rc6. How should I update the code to allow for private downloads again, the new code breaks the ability to use private downloads.
Comment #21
copeasetic commentedRe-posting since I tagged it with the wrong version.... This issue is back with 6.x-4.2-alpha2. How should I update the code to allow for private downloads again, the new code breaks the ability to use private downloads.
Comment #22
copeasetic commentedWell, I am not the best code jockey out there.. In fact, I'm a hack.... I changed the following code to stop the Code 200, stream not found error... Access Denied serving uploaded S3 videos.....
modules/video/plugins/video_s3/includes
Alpha2 code change
Lines changed:
Line 135 original: $perm = (variable_get('amazon_s3_private', FALSE) == FALSE) ? S3::ACL_PUBLIC_READ : S3::ACL_PRIVATE;
Line 135 revised: $perm = (variable_get('amazon_s3_private', FALSE) == FALSE) ? S3::ACL_PRIVATE : S3::ACL_PUBLIC_READ;