similar to: [Sentry]-before_validation(model) not working for crypted-attribute?

Displaying 20 results from an estimated 1000 matches similar to: "[Sentry]-before_validation(model) not working for crypted-attribute?"

2006 Mar 24
0
undefined method `crypted_password='' while using Sentry
I''d like to hear from some one who has been using Sentry successfully. I am trying to symmetrically_encrypts :password for a user model. It is a bare bones model just to test Sentry. I have password defined as ''text'' in the users table. I have openssl library installed on Debian Sarge. The secret key is defined in environment.rb. But when I submit the form I get
2007 Apr 05
0
unexpected behavior of before_validation
Today I found these comments in active record''s callbacks.rb file: # If the returning value of a before_validation callback can be evaluated to false, the process will be aborted and Base#save will return false. # If Base#save! is called it will raise a RecordNotSave error. # Nothing will be appended to the errors object. This caused me a lot of frustration earlier when I was
1998 May 27
0
Updated: Sentry Port Scan Detector 0.60
Hello, I would normally not write this list to announce an update to a software package, however there have been a number of very significant changes to this program that users of it may want to upgrade and new users may want to check out. What it is =-=-=-=-=- Sentry is a port scan detector for Linux, *BSD, and most UNIX variants. What it does =-=-=-=-=-=- Sentry monitors your systems for
2007 Aug 19
0
Sentry plugin causing migration to fail
I have an application that uses the Sentry plug-in. I am using Sentry on my Users model for encrypting passwords. It works fine inside the application, but whenever I call User.create in my migration (in order to set-up a default user) I get the following error when I run the migrations: rake aborted! undefined method `symmetrically_encrypts'' for User:Class Has anyone experienced this
2006 Mar 24
1
Problems with before_validation
Hi all My visitors can create party organisator profiles, and I want assign them as the creators (the field creator_id in the organisators table references a member in the members table). To do that I tried it with before_validation: def before_validation creator = Member.find 1 end Sadly, this does not work. The validation validates_presence_of :creator_id Still tells me, that
2011 Jun 19
1
before before_validation callback
Hi, I was looking around a bit and couldn''t find any callbacks that executed before before_validation The current problem with using before_validation is that it won''t fire if I''m not using validations with #save(:validate => false) - which makes sense. Before_save won''t suffice because I want these callbacks to fire before validation on the occasions that
2012 May 26
2
before_create is after_validatation :on => :create , when it should be before_validation :on => :create
In ActiveRecord''s callbacks, methods within a before_create callback are called after the validation, but before the model is created. This was an intentional design decision, but I think it was the wrong one. What do you think? When I think of before_create, I think of before_validation :foo, :on => :create, but, by default, before_create is synonymous with after_validation :foo,
2006 Feb 06
5
Sentry Plugin - Easy Question I don''t doubt
I am looking at adding the Sentry plugin to one of the applications that we are working on. I have a need to store some info that will have to be encrypted and decrypted. I have been going through the docs for the plugin and the AsymetricSentry class looks like the best for what we need to do but I am not sure how to generate the key. The docs say: This is a shortcut for using an
2009 Nov 09
4
Decrypt a admin password (with salt)
Hello, I want decrypt a password which is encrypted by MD5. there are 4 functions which i am using : # Encrypts some data with the salt. def self.encrypt(password, salt) Digest::SHA1.hexdigest("--#{salt}--#{password}--") end # Encrypts the password with the user salt def encrypt(password) self.class.encrypt(password, salt) end def authenticated?(password)
1997 Dec 05
3
New Program: Abacus Sentry - Port Scan Detector
Hello, I just made available a beta version of a port scan detector that I''ve been working on. The program, called Abacus Sentry, is a port scan/probe detector that offers what I think are a number of unique and useful features: - Runs on TCP or UDP sockets. Configurable by the user to bind to multiples of sockets for increased detection coverage. - Adjustable scan detection value with
2008 Aug 01
0
Help with Access Control
Hi, I am following the excellent tutorial http://www.railsforum.com/viewtopic.php?id=14216 (post 5) on how to implement an access control feature i.e. only a friend is allowed to view a profile of a particular member. I am not using the restful authentication plugin as the author is using to implement the authentication feature (post 1) in the tutorial. All I am interested in is the post 5
2006 Apr 30
3
MySQL connection problems on Dreamhost
To all fellow Dreamhosters out there... Sometimes my app mysteriously loses its connection to the database, resulting in a big ugly "Application Error (Rails)" page. Usually refreshing the page makes it go away, but not today. :-( In production.log I see this: MysqlError (Lost connection to MySQL server during query): Any idea why this happens? It''s rather intermittent
2009 Nov 14
3
authlogic fails on existing accounts when crypted_password is blank
I recently ran a migration to add the following to an existing user model: t.string "crypted_password" t.string "password_salt" t.string "persistence_token" There is an existing (cleartext) password field, but authlogic doesn''t seem to be reading that on existing accounts. As a result, all logins for existing accounts fail. How can I get
2006 Apr 26
1
Possible acts_as_authenticated bug (or rails)
The code that comes with the plugin uses a method that looks like this: def password_required? crypted_password.blank? or not password.blank? end with validations that look like this: validates_presence_of :password, :if => :password_required? validates_presence_of :password_confirmation, :if => :password_required? validates_length_of
2006 Aug 14
0
Dependencies.rb issue
I am testing the 1.1.6 on a new server that we were going to migrate to and have run into an issue with loading the sentry plugin. I think it has to do with the changes to dependencies.rb but not sure. I have Sentry set to load the key directories in the environment.rb file and on server start I receive a `const_missing'': uninitialized constant Sentry (NameError). This is
2006 May 31
3
Database can''t connect -
I''m sorry guys. I''m really still such a newbie at this. i''ve been having trouble getting my Rails apps to run on Dreamhost, and I think it might be a problem with the database connection. Anyway, I read on Code Snippets that I should do this: [rhod]$ ruby -Iconfig -renvironment -e "p ActiveRecord::Base.connection" to find out if my database.yml file is
2012 Mar 22
1
Rspec not loading fixtures
I am taking over a code base and am trying to run the tests. I am somewhat new to RSpec so this might be a trivial problem. Basically I can tell that the fixtures are not getting loaded. All 100 tests fail with a similar error. But I don''t know why. Below is the code, with my narrative with *** before it... Can you see anything or give me a clue where to look. So far I am coming up
2007 Mar 13
4
Centos-specific Denyhosts Howto Anyone?
Hi, after reading the docs (no man page) and seeing a few example howtos, I see none for Centos specifically. I hereby offer to write this and even host it, and any other wiki-able howto you want, if you can school me on the first few steps relevant to how to link up the current rpmforge rpm for RHEL4-64. See, right now, the one for centos loads into the /usr/share/doc, which is an odd place
2007 Nov 17
18
Syntax Problem
I admit I am stuck. I am converting a legacy php site to ROR. The old site uses MD5, a security flaw waiting to happen. I upgraded to AAA and am adding code in the session_controller.rb file to see if crypted_password is blank. If it is, crypt and check the password against the old md5 version and write it in the new crypted_password field. Here is my code add on before the logged_in?: def
2009 Jun 24
2
At my wits end ! Controlling passed in negative values from a form
Hi, I am trying to validate a numeric value passed in from a form, which is saved in a MySQL db as decimal(9,2) Now problem is I need to ensure people don''t enter a form value like -. 003. In my validations, I have a validates_numericality_of check being done. Furthermore, in validate method, I have a check using an if statement such as : ((an_object[n].nil? or an_object[n] < 0) and