Google Groups Home
Help | Sign in
Message from discussion Admin site with latest release - nil to string
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Greg Newman  
View profile
 More options Nov 13 2006, 8:14 am
From: "Greg Newman" <greg.carb...@gmail.com>
Date: Mon, 13 Nov 2006 08:14:02 -0500
Local: Mon, Nov 13 2006 8:14 am
Subject: Re: [Mephisto] Re: Admin site with latest release - nil to string

That did it.  Thanks Mislav!

On 11/13/06, Mislav Marohnić <mislav.maroh...@gmail.com> wrote:

> Rick reworked this very code on 2006-11-07. (You can find this out by
> using the "svn log" command). It seems he broke something.

> Try changing the line 84 to:
> authdata = request.env[@@http_auth_headers.detect { |h|
> request.env.has_key?(h) } || ''].to_s.split

> The key now falls back to empty string instead of nil, which may keep the
> `[]` operator of request.env happy.

> -M

> On 11/13/06, Greg Newman <greg.carb...@gmail.com> wrote:

> > I would assume something has changed with Mephisto since older versions
> > work fine on this same server.
> > Any fix to this?

> > On 11/13/06, Mislav Marohnić <mislav.maroh...@gmail.com> wrote:

> > > This line:
> > > request.env[@@http_auth_headers.detect { |h| request.env.has_key?(h)
> > > }]

> > > evaluates to nil. That means none of the headers:
> > > %w(X-HTTP_AUTHORIZATION HTTP_AUTHORIZATION Authorization)

> > > are found in request.env. So, either it is a bad request, HTTP
> > > authentication issue or a Rails/server bug.

> > > I remember having this very issue (nonexistent HTTP auth headers) when
> > > I was writing my own authentication filters. The headers were simply not
> > > accessible from Rails. I never learned why - similar code worked for other
> > > people

> > > -M

> > > On 11/13/06, Greg Newman < greg.carb...@gmail.com> wrote:

> > > > I'm getting the following with the latest trunk (installed fresh
> > > > this morning) when I try to get to the admin site:

> > > > TypeError (can't convert nil into String):
> > > >     /lib/authenticated_system.rb:84:in `[]'
> > > >     /lib/authenticated_system.rb:84:in `get_auth_data'
> > > >     /lib/authenticated_system.rb:21:in `login_required'
> > > >     /vendor/rails/actionpack/lib/action_controller/filters.rb:456:in
> > > > `call'
> > > >     /vendor/rails/actionpack/lib/action_controller/filters.rb:435:in
> > > > `call'
> > > >     /vendor/rails/actionpack/lib/action_controller/filters.rb:640:in
> > > > `call_filter'
> > > >     /vendor/rails/actionpack/lib/action_controller/filters.rb:641:in
> > > > `call_filter'
> > > >     /vendor/rails/actionpack/lib/action_controller/filters.rb:438:in
> > > > `call'
> > > >     /vendor/rails/actionpack/lib/action_controller/filters.rb:640:in
> > > > `call_filter'
> > > >     /vendor/rails/actionpack/lib/action_controller/filters.rb:641:in
> > > > `call_filter'
> > > >     /vendor/rails/actionpack/lib/action_controller/filters.rb:438:in
> > > > `call'
> > > >     /vendor/rails/actionpack/lib/action_controller/filters.rb:640:in
> > > > `call_filter'
> > > >     /vendor/rails/actionpack/lib/action_controller/filters.rb:641:in
> > > > `call_filter'
> > > >     /vendor/rails/actionpack/lib/action_controller/filters.rb:438:in
> > > > `call'
> > > >     /vendor/rails/actionpack/lib/action_controller/filters.rb:640:in
> > > > `call_filter'
> > > >     /vendor/rails/actionpack/lib/action_controller/filters.rb:641:in
> > > > `call_filter'
> > > >     /vendor/rails/actionpack/lib/action_controller/filters.rb:449:in
> > > > `call'
> > > >     /vendor/rails/actionpack/lib/action_controller/filters.rb:640:in
> > > > `call_filter'
> > > >     /vendor/rails/actionpack/lib/action_controller/filters.rb:622:in
> > > > `perform_action_without_benchmark'

> > > > /vendor/rails/actionpack/lib/action_controller/benchmarking.rb:66:in
> > > > `perform_action_without_rescue'
> > > >     /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure'

> > > > /vendor/rails/actionpack/lib/action_controller/benchmarking.rb:66:in
> > > > `perform_action_without_rescue'
> > > >     /vendor/rails/actionpack/lib/action_controller/rescue.rb:111:in
> > > > `perform_action'
> > > >     /vendor/rails/actionpack/lib/action_controller/base.rb:427:in
> > > > `process_without_filters'
> > > >     /vendor/rails/actionpack/lib/action_controller/filters.rb:627:in
> > > > `process_without_session_management_support'

> > > > /vendor/rails/actionpack/lib/action_controller/session_management.rb:114:in
> > > > `process'
> > > >     /vendor/rails/actionpack/lib/action_controller/base.rb:330:in
> > > > `process'
> > > >     /vendor/rails/railties/lib/dispatcher.rb:41:in `dispatch'
> > > >     dispatch.cgi:10

> > > > --
> > > > I saw another thread about this but it didn't seem to have any
> > > > answers.

> > > > - Greg Newman
> > > > -------------------------------------------
> > > > http://www.carbon8.us
> > > > http://www.busyashell.com

> > --

> > - Greg Newman
> > -------------------------------------------
> > http://www.carbon8.us
> > http://www.busyashell.com

--

- Greg Newman
-------------------------------------------
http://www.carbon8.us
http://www.busyashell.com


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google