passwords

Rails 3 Devise manually change password

瘦欲@ 提交于 2019-12-03 03:41:40
I try to usung devise in my rails app. But i don't understand how can i give user functionality to change his password. I need a form with fields "old password", "new password" and "new password confirmation". How can i do it? If i use default devise form on "/profile" page <%= render :template => 'devise/passwords/edit', :locals => { :resource => my_user_model_variable, :resource_name => my_user_model_name } %> In user.rb contain line attr_accessible :email, :password, :password_confirmation, :remember_me But there was undefined method 'devise_error_messages!' for #<#<Class:0x59b9200> and

Authentication in shiny app and multiple pages

允我心安 提交于 2019-12-03 03:38:23
In the system that I am developing I have 3 different actors (user, admin, support team) using Shiny App. I want to know how I can give authentication to these three actors that each of these actor only access to their page. I found that It can be possible with shiny server Pro which is not free. Is there any way to do it instead of using shiny server pro. In the UI.R the code are as following: library(shiny) library(shinydashboard) rm(list = ls()) Logged = FALSE; my_username <- "test" my_password <- "test" ui1 <- dashboardPage( dashboardHeader(), dashboardSidebar(), dashboardBody( box( ui =

How display text in password field

给你一囗甜甜゛ 提交于 2019-12-03 03:26:20
I have the password field on page. I want to display text "Enter password" on screen before entering password but on focus when user enter password it should go back to password type EDIT: I am using Jquery as well so any small jquery solution will do [Latest revisision to include IE support] Update for IE9: Version 9 of IE allows the change of the type attribute for input elements of type text/password back and forth As mentioned in the comments (and verified) the previous examples did not work in IE as it does not allow the change of the type by script ... Here is a workaround, which

Can someone point me to a good PHP/MySQL salted hashed password implementation?

帅比萌擦擦* 提交于 2019-12-03 03:19:05
After reading about salts password hashing Id like to implement a simple version for an admin area to a site Im building. If you have any good links with code that have implemented this idea well, I would appreciate it if you could share. Thanks, Registration process: User enters a password. System generates a salt value from random data (could be a hash of the time & PID or something). Systems generates a hash value of the password & salt value and stores both of these in the registration table. Login process: User enters a password. System pulls the salt value from the database and hashes it

Drupal 6 user password import to Drupal 7

微笑、不失礼 提交于 2019-12-03 03:18:42
I don't really need to import any data into my D7 build other than users. I have (by SQL) imported my user data however, the D7 password encryption method is now different. I'm not an expert by any stretch of the imagination and I've never used Drush, but I have come across this user_update_7000 code snippet found user.install ( http://api.drupal.org/api/drupal/modules--user--user.install/function/user_update_7000/7 ) <?php require_once DRUPAL_ROOT . '/' . variable_get('password_inc', 'includes/password.inc'); $old_hash = md5('password'); $hash_count_log2 = 11; $new_hash = user_hash_password(

Updating `User` attributes without requiring password

三世轮回 提交于 2019-12-03 03:10:11
问题 Right now, users can edit some their attributes without having to enter their password because my validations are set up like this: validates :password, :presence =>true, :confirmation => true, :length => { :within => 6..40 }, :on => :create validates :password, :confirmation => true, :length => { :within => 6..40 }, :on => :update, :unless => lambda{ |user| user.password.blank? } However, after a user does this, their password is deleted - update_attributes is updating their password to "".

Default password of mysql in ubuntu server 16.04

女生的网名这么多〃 提交于 2019-12-03 03:02:44
问题 I have installed ubuntu 16.04 server. Mysql server was installed by default in it. When I am trying to access the mysql with mysql -u root -p , I am unable to log in to mysql because I dont have the password. Is there any default password? I have also tried with --skip-grant-tables , even this does not work. Even trying to log in with just mysql -u root is a failure. 回答1: This is what you are looking for: sudo mysql --defaults-file=/etc/mysql/debian.cnf MySql on Debian-base Linux usually use

What is md5() for?

末鹿安然 提交于 2019-12-03 02:59:08
问题 I was reading this tutorial for a simple PHP login system. In the end it recommends that you should encrypt your password using md5(). Though I know this is a beginners' tutorial, and you shouldn't put bank statements behind this login system, this got me thinking about encryption. So I went ahead and went to (one of the most useful questions this site has for newbies): What should a developer know before building a public web site? There it says (under security) you should: Encrypt Hash and

CakePHP 2: Override AuthComponent's “password” method

拥有回忆 提交于 2019-12-03 02:50:36
My goal is to have a unique salt for each user rather than just using Configure::read('Security.salt') for every user. I know that CakePHP 2.x no longer hashes passwords automatically. This allows me to perform model validation on passwords, which is very nice. However, I don't see a way that I can override the AuthComponent's "password" method. So even though I can control how passwords are hashed before they are saved to the database, I cannot control how passwords are hashed when performing the actual login. From the cookbook: You don’t need to hash passwords before calling $this->Auth-

How to reset password with UserManager of ASP.NET MVC 5

让人想犯罪 __ 提交于 2019-12-03 02:44:09
问题 I am wondering if there is a way to reset password with UserManager of ASP.NET MVC 5 I tried this with user that already has a password but no success. Any clue? IdentityResult result = UserManager.AddPassword(forgotPasswordEvent.UserId.ToString(), model.ConfirmPassword); if (result.Succeeded) { // } else { AddErrors(result); } 回答1: It is here ASP.NET Identity reset password UserManager<IdentityUser> userManager = new UserManager<IdentityUser>(new UserStore<IdentityUser>()); userManager