gumartinm / mobiads

Automatically exported from code.google.com/p/mobiads
0 stars 0 forks source link

Cookies and Create 2 Virtual Servers for Apache #5

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
1. Virtual Server for users.
2. Virtual Server for companies.

Actually my cookie is like this (showing just the one for the users):

Set-Cookie: mobieuser=cse8k49a230cn97nh9jf0qonv5; path=/userfront.php

We are protecting just URLs down 192.168.1.34/userfront.php

But, the images (for example) are not down userfront.php but down 192.168.1.34 
directly. So the images and more stuff are not protected by the cookie and any 
user without authentication may download them.

Besides, do not forget to add the domain parameter to my cookies (for users and 
companies)

To sum up. Create two virtual servers with Apache. The first one for users and 
the second one for companies. We are going to have two domains:

company.mydomain.com
users.mydomain.com

To use the domain parameter for the cookies configuration and stop using the 
path parameter. In this way, the web browsers will make petitions like this:

GET /images/inadminpanel/images/search.png HTTP/1.1

Host: company.mydomain.com

or 

GET /images/inadminpanel/images/search.png HTTP/1.1
Host: users.mydomain.com

And our images and any other stuff stored on our server will be protected by 
the cookies and the authentication (I hope)

Original issue reported on code.google.com by gu.mart...@gmail.com on 26 May 2012 at 6:14

GoogleCodeExporter commented 8 years ago
FALSE: in that way we are not protecting the images or other stuff by cookies. 

I need a special symfony module, which will allow us to download stuff.

GET /images.php/uploads/images/mypicture.jpg

This module must offer the picutre wihout any other HTML code but it have to 
check if the user has the right cookie (if he/she is an authenticated user)

Original comment by gu.mart...@gmail.com on 26 May 2012 at 7:04