Is it safe to store cookies in the database?

If I use mechanize , for example, I can create a new Google Analytics profile for the website. I do this by programmatically filling out the login form and storing cookies in the database. Then, at least until the cookie expires, I can access the analytics admin panel without re-entering the username and password.

Assuming you cannot create a new analytics profile in any other way (with OpenAuth or any of them, I don't think it works to actually create a new Google Analytics profile, the Google Analytics API is designed to view the data, but I need to create a new profile analysts), does a cookie store a bad thing in the database?

If I store a cookie in a database, it is very easy to program in Google Analytics without user intervention in the browser (perhaps the application has functions that say β€œuser”, you can schedule a hook that creates a new anaytics profile for each new domain, which you create, just enter your credentials once, and we will keep you logged in and secure. ") Otherwise, I will have to continue to transfer letters and passwords that seem worse.

So does cookies store in a secure database?

+3
source share
1 answer

, , Google . , API Google Analytics.

, .

, , , . . . SQL Injection , , . , . , , SQL Injection .

, , , Linux, :). / . , chmod 700 file_name, , -: chown apache:apache file_name. MySQL, , file_priv (File Privilges) ruby. , SQL-.

0

Source: https://habr.com/ru/post/1741924/


All Articles