html5 - Obvious security flaws in redirect? -


i have web app stores videos. using java servlet (over https) verifies username , password. once details verified, redirect user video stored in aws s3. don't know how s3 works, web service stores objects (basically think of storing files). uses https. make work, s3 object (file) public. i've given random name full of numbers , letters.

so servlet looks this:

void doget(request, response){    if (authenticateuser(request.getparameter("username"), request.getparameter("password")){       response.sendredirect("https://s3.amazonaws.com/mybucket/xyz1234567.mp4");    } } 

this simplified gets point across. there obvious security flaws here? video tag have source of https://www.mysite.com/getvideo?username="me"&password="randomletters". @ first blush seems should secure else assuming give file names sitting @ aws s3 sufficiently random names?

the obvious security flaw detect url authentication servlet redirects to, , share url friends, allowing access resource directly, without going through euthentication servlet.

unfortunately, don't know s3 @ all, can't recommend fix security problem.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -