Setting up the keys should be a one-time event (it's handled as migration
step 12) so you shouldn't have to worry about the keys changing.

One concern I would have with your switching to a SHA hash for storing the
passwords is that if you're still using the same libraries behind the scenes
(OpenSSL), you might still run into the same issue that isn't writing out
the key files correctly.

Could you let me know the versions of what you're running:

OS X
10.4.x/10.5.x?

Ruby
ruby -v

OpenSSL
openssl version

Thanks.

Long

On Tue, Sep 23, 2008 at 11:23 PM, Yi Tan <[EMAIL PROTECTED]> wrote:

> Thanks Long,
>
> I did some google search on that issue. I tried drop/re-create ->
> reinstall, but it failed on the same error... This issue was eventually
> resolved it by manually regenerating both keys after installation. But new
> keys invalidate existing user passwords are.
>
> To me, this is a quite seriouse issue, because it limits the portablity of
> the application. I can't just assume it will work on the production
> environment. Thus I replaced openssl encryption by SHA salts.
>
> ty
>
> On Wed, Sep 24, 2008 at 7:17 AM, Long Nguyen <[EMAIL PROTECTED]>wrote:
>
>> That's odd.  Usually the error is when you transfer files from a Windows
>> machine to a UNIX-based one.  The end-of-line characters added by windows
>> are the cause.
>>
>> Probably what you should do is delete the rsa_key and rsa_key.pub files in
>> your Insoshi install, drop/re-create the database and re-run the install.
>> (I'm assuming that since this is your dev machine, you shouldn't have any
>> issues with running these operations database.) This should regenerate the
>> rsa_key* files.
>>
>> Long
>>
>>
>> On Sat, Sep 20, 2008 at 9:46 AM, Yi <[EMAIL PROTECTED]> wrote:
>>
>>>
>>> Hi,
>>>
>>> I've got the exact same problem on my dev machine (Mac OS, git clone
>>> Insoshi).
>>>
>>> Have you found any fix to it?
>>>
>>> Cheers,
>>>
>>> Yi
>>>
>>> On 8月27日, 上午1时56分, "Long Nguyen" <[EMAIL PROTECTED]> wrote:
>>> > The error that you're getting [IOpenSSL::PKey::RSAError (padding check
>>> > failed)] is probably due to unexpected end-of-line characters.
>>> >
>>> > How did you transfer the files up to the production machine? And is
>>> your
>>> > development machine running Windows?
>>> >
>>> > Long
>>> >
>>> >
>>> >
>>> > On Tue, Aug 26, 2008 at 1:54 AM, Paco Viramontes <[EMAIL PROTECTED]>
>>> wrote:
>>> >
>>> > > I get this error on prodction deploy when I try to login to default
>>> > > admin user
>>> >
>>> > > I had no problem on my devel machine but on ubuntu I get this do I
>>> > > need to regenerate the keys some other way?
>>> >
>>> > > PAco
>>> >
>>> > > IOpenSSL::PKey::RSAError (padding check failed):
>>> > >     /config/initializers/crypto.rb:27:in `private_decrypt'
>>> > >     /config/initializers/crypto.rb:27:in `send'
>>> > >     /config/initializers/crypto.rb:27:in `decrypt'
>>> > >     /app/models/person.rb:286:in `decrypt'
>>> > >     /app/models/person.rb:298:in `unencrypted_password'
>>> > >     /app/models/person.rb:293:in `authenticated?'
>>> > >     /app/models/person.rb:268:in `authenticate'
>>> > >     /app/controllers/sessions_controller.rb:11:in `create'
>>> > >     /vendor/rails/actionpack/lib/action_controller/base.rb:1162:in
>>> > > `send'
>>> > >     /vendor/rails/actionpack/lib/action_controller/base.rb:1162:in
>>> > > `perform_action_without_filters'
>>> > >     /vendor/rails/actionpack/lib/action_controller/filters.rb:580:in
>>> > > `call_filters'
>>> > >     /vendor/rails/actionpack/lib/action_controller/filters.rb:573:in
>>> > > `perform_action_without_benchmark'
>>> > >     /vendor/rails/actionpack/lib/action_controller/benchmarking.rb:
>>> > > 68:in `perform_action_without_rescue'
>>> > >     /usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
>>> > >     /vendor/rails/actionpack/lib/action_controller/benchmarking.rb:
>>> > > 68:in `perform_action_without_rescue'
>>> > >     /vendor/rails/actionpack/lib/action_controller/rescue.rb:201:in
>>> > > `perform_action_without_caching'
>>> > >     /vendor/rails/actionpack/lib/action_controller/caching/
>>> > > sql_cache.rb:13:in `perform_action'
>>> > >     /vendor/rails/activerecord/lib/active_record/connection_adapters/
>>> > > abstract/query_cache.rb:33:in `cache'
>>> > >     /vendor/rails/activerecord/lib/active_record/query_cache.rb:8:in
>>> > > `cache'
>>> > >     /vendor/rails/actionpack/lib/action_controller/caching/
>>> > > sql_cache.rb:12:in `perform_action'
>>> > >     /vendor/rails/actionpack/lib/action_controller/base.rb:529:in
>>> > > `send'
>>> > >     /vendor/rails/actionpack/lib/action_controller/base.rb:529:in
>>> > > `process_without_filters'
>>> > >     /vendor/rails/actionpack/lib/action_controller/filters.rb:569:in
>>> > > `process_without_session_management_support'
>>> > >     /vendor/rails/actionpack/lib/action_controller/
>>> > > session_management.rb:130:in `process'
>>> > >     /vendor/rails/actionpack/lib/action_controller/base.rb:389:in
>>> > > `process'
>>> > >     /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:
>>> > > 149:in `handle_request'
>>> > >     /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:
>>> > > 107:in `dispatch'
>>> > >     /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:
>>> > > 104:in `synchronize'
>>> > >     /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:
>>> > > 104:in `dispatch'
>>> > >     /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:
>>> > > 120:in `dispatch_cgi'
>>> > >     /vendor/rails/actionpack/lib/action_controller/dispatcher.rb:
>>> > > 35:in `dispatch'
>>> > >     /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/
>>> > > rails.rb:76:in `process'
>>> > >     /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/
>>> > > rails.rb:74:in `synchronize'
>>> > >     /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/
>>> > > rails.rb:74:in `process'
>>> > >     /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:
>>> > > 159:in `process_client'
>>> > >     /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:
>>> > > 158:in `each'
>>> > >     /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:
>>> > > 158:in `process_client'
>>> > >     /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:
>>> > > 285:in `run'
>>> > >     /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:
>>> > > 285:in `initialize'
>>> > >     /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:
>>> > > 285:in `new'
>>> > >     /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:
>>> > > 285:in `run'
>>> > >     /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:
>>> > > 268:in `initialize'
>>> > >     /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:
>>> > > 268:in `new'
>>> > >     /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:
>>> > > 268:in `run'
>>> > >     /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/
>>> > > configurator.rb:282:in `run'
>>> > >     /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/
>>> > > configurator.rb:281:in `each'
>>> > >     /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/
>>> > > configurator.rb:281:in `run'
>>> > >     /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:
>>> > > 128:in `run'
>>> > >     /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/
>>> > > command.rb:212:in `run'
>>> > >     /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281
>>> > >     /usr/bin/mongrel_rails:19:in `load'
>>> > >     /usr/bin/mongrel_rails:19
>>> >
>>> > --
>>> > Long Nguyen
>>> > [EMAIL PROTECTED]
>>>
>>>
>>
>>
>> --
>> Long Nguyen
>> [EMAIL PROTECTED]
>>
>>
>>
>
> >
>


-- 
Long Nguyen
[EMAIL PROTECTED]

--~--~---------~--~----~------------~-------~--~----~
Insoshi developer site: http://dogfood.insoshi.com/
Insoshi documentation: http://docs.insoshi.com/

You received this message because you are subscribed to the Google
Groups "Insoshi" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/insoshi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to