remember-me

PHP: Remember Me and security?

拟墨画扇 提交于 2019-12-03 12:25:27
During the time I've spent taking breaks from learning how PHP supports Unicode I've been delving into making my "Remember Me" cookies a bit more secure. However there are a few things I don't understand and a few of my own musings I'd like some suggestions and opinions on. 1) Is there any method to adopting a "Remember Me" feature that doesn't involve cookies? Curious since there are obvious security flaws in storing authentication cookies. Not that there aren't security risks in just about everything. 2) Since I'm not working with a bank or "highly sensitive" information, is it necessary to

PHP “Remember Me” security flaw?

折月煮酒 提交于 2019-12-03 11:04:50
I'm in the middle of coding a 'remember me'-equipped login form, and so far the tutorials I've read (partly to make sure I'm doing it right) all say to store the encrypted password in a cookie along with the username. Then, each time PHP checks if the current user is not logged in, check their cookies and look for those values. If the username matches the password, you're in. To me, this is a gaping security hole. If somebody were to hack the database or somehow get access to the encrypted passwords, they wouldn't even need to crack them. Just set your own cookies and go. Am I correct, or just

Proper way to use “Remember me” functionality in PHP

青春壹個敷衍的年華 提交于 2019-12-03 09:51:45
问题 Short Working on login system and trying to implement remember me feature. Recently, l did research about this subject, read bunch of articles, posts, stories, novels, fairy tales (calling them so, because some of them doesn't contain even 1 line of code, just loads of words) about, cookie vulnerabilities such as fixation, hijacking ... etc. And decided to achieve following targets To set time delay between login attempts (to prevent bruteforce attacks) and to limit attempts count To

how to create a secure php login system, allowing for “keep me logged in” functionality?

痴心易碎 提交于 2019-12-03 07:54:55
问题 I use a simple login system based on SESSION vars. Once the user logs in, a session var is set that tells my script the user is to be accepted in. I don't use any custom clientside cookie var. I would like to offer the option on the login screen that says "keep me loggued in the whole day". How does one do that in a secure way? 回答1: First: Configure the session.cookie_lifetime directive, either in php.ini, configuration files, or via session_set_cookie_params(). Next, store the username and

Automatic Login with Rails?

夙愿已清 提交于 2019-12-03 07:17:15
问题 I am trying to get up a simple authentication system with Rails' Restful-Authentication plugin, and am just wondering how it works, b/c I can't seem to figure out what the requirements are for cookies, and how to make it so the browser always remembers you (for 6+ months). Few questions: 1) How do you do remember_me's for ruby's restful_authentication? I can't seem to find a good one-liner to solve this problem... If a user signs up and checks "Remember Me", how does the rails application get

ASP.NET Identity 2 Remember Me - User Is Being Logged Out

隐身守侯 提交于 2019-12-03 06:23:20
I am using Identity 2.1 in my MVC5 app. I am setting the isPersistent property of the PasswordSignInAsync to true to enable 'Remember Me': var result = await SignInManager.PasswordSignInAsync(model.Username, model.Password, true, shouldLockout: false); But if I stay logged in overnight, then when I refresh the page in the morning, it logs me out and I have to sign in again. How do I prevent automatic logging out until the user manually logs out? Is it something to do with the Cookie Authentication that identity uses? I don't really understand the CookieAuthenticationOptions that are set in

Spring Security RememberMe Services with Session Cookie

故事扮演 提交于 2019-12-03 03:32:18
I am using Spring Security's RememberMe Services to keep a user authenticated. I would like to find a simple way to have the RememberMe cookie set as a session cookie rather than with a fixed expiration time. For my application, the cookie should persist until the user closes the browser. Any suggestions on how to best implement this? Any concerns on this being a potential security problem? The primary reason for doing so is that with a cookie-based token, any of the servers behind our load balancer can service a protected request without relying on the user's Authentication to be stored in an

FOSUserBundle and remember me

╄→гoц情女王★ 提交于 2019-12-03 03:04:37
I'm using a FOSUserBundle for authentication in Symfony2. Everything works fine except "remember me". My security.yml looks like this: security: providers: fos_userbundle: id: fos_user.user_manager encoders: 'FOS\UserBundle\Model\UserInterface': sha512 firewalls: main: pattern: ^/ form_login: provider: fos_userbundle logout: true anonymous: true remember_me: key: aSecretKey lifetime: 3600 path: / domain: ~ access_control: - { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY

Proper way to use “Remember me” functionality in PHP

南楼画角 提交于 2019-12-02 23:06:16
Short Working on login system and trying to implement remember me feature. Recently, l did research about this subject, read bunch of articles, posts, stories, novels, fairy tales (calling them so, because some of them doesn't contain even 1 line of code, just loads of words) about, cookie vulnerabilities such as fixation, hijacking ... etc. And decided to achieve following targets To set time delay between login attempts (to prevent bruteforce attacks) and to limit attempts count To regenerate session id on nearly every operation But I really confused about my main problem: which way is

ExtJS: Login with 'Remember me' functionality

爷,独闯天下 提交于 2019-12-02 21:06:22
I'm trying to create a simple login window with the very common 'Remember me' functionality. The login validation is done AJAX style, thus the browser won't remember my input. My approach is to use the built-in state functionality, but how to use it confuses me. Ext.state.Manager.setProvider(new Ext.state.CookieProvider({ expires: new Date(new Date().getTime()+(1000*60*60*24*7)), //7 days from now })); ... { xtype: 'textfield', fieldLabel: 'User name', id: 'txt-username', stateful: true, stateId: 'username' }, { xtype: 'textfield', fieldLabel: 'Password', id: 'txt-password', inputType: