Google Groups Home
Help | Sign in
Admin site with latest release - nil to string
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  16 messages - Collapse all
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, 6:25 am
From: "Greg Newman" <greg.carb...@gmail.com>
Date: Mon, 13 Nov 2006 06:25:45 -0500
Local: Mon, Nov 13 2006 6:25 am
Subject: Admin site with latest release - nil to string

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


    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.
Mislav Marohnić  
View profile
 More options Nov 13 2006, 7:30 am
From: "Mislav Marohnić" <mislav.maroh...@gmail.com>
Date: Mon, 13 Nov 2006 13:30:19 +0100
Local: Mon, Nov 13 2006 7:30 am
Subject: Re: [Mephisto] Admin site with latest release - nil to string

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:


    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.
Greg Newman  
View profile
 More options Nov 13 2006, 7:38 am
From: "Greg Newman" <greg.carb...@gmail.com>
Date: Mon, 13 Nov 2006 07:38:32 -0500
Local: Mon, Nov 13 2006 7:38 am
Subject: Re: [Mephisto] Re: Admin site with latest release - nil to string

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:

--

- 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.
Mislav Marohnić  
View profile
 More options Nov 13 2006, 7:54 am
From: "Mislav Marohnić" <mislav.maroh...@gmail.com>
Date: Mon, 13 Nov 2006 13:54:50 +0100
Local: Mon, Nov 13 2006 7:54 am
Subject: Re: [Mephisto] Re: Admin site with latest release - nil to string

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:


    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.
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:

--

- 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.
Mislav Marohnić  
View profile
 More options Nov 13 2006, 8:18 am
From: "Mislav Marohnić" <mislav.maroh...@gmail.com>
Date: Mon, 13 Nov 2006 14:18:43 +0100
Local: Mon, Nov 13 2006 8:18 am
Subject: Re: [Mephisto] Re: Admin site with latest release - nil to string

No problem. In the future, don't hesitate to analyze the error trace. In
case of nil errors, most of the time just by inspecting the line in question
you can immediately see what is wrong.

-M

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


    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.
Greg Newman  
View profile
 More options Nov 13 2006, 8:26 am
From: "Greg Newman" <greg.carb...@gmail.com>
Date: Mon, 13 Nov 2006 08:26:45 -0500
Local: Mon, Nov 13 2006 8:26 am
Subject: Re: [Mephisto] Re: Admin site with latest release - nil to string

I do Mislav, unfortunately, I wouldn't have had a fix for that one myself.
:)

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

> No problem. In the future, don't hesitate to analyze the error trace. In
> case of nil errors, most of the time just by inspecting the line in question
> you can immediately see what is wrong.

> -M

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

> > That did it.  Thanks Mislav!

--

- 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.
Rick Olson  
View profile
 More options Nov 13 2006, 10:49 am
From: "Rick Olson" <technowee...@gmail.com>
Date: Mon, 13 Nov 2006 09:49:24 -0600
Local: Mon, Nov 13 2006 10:49 am
Subject: Re: [Mephisto] Re: Admin site with latest release - nil to string
On 11/13/06, Greg Newman <greg.carb...@gmail.com> wrote:

> I do Mislav, unfortunately, I wouldn't have had a fix for that one myself.
> :)

What version of ruby are you on?  I'm unable to duplicate this.  Maybe
the live request.env is slightly different and doesn't like nils?  I
don't know.

--
Rick Olson
http://weblog.techno-weenie.net
http://mephistoblog.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.
Rick Olson  
View profile
 More options Nov 13 2006, 10:57 am
From: "Rick Olson" <technowee...@gmail.com>
Date: Mon, 13 Nov 2006 09:57:15 -0600
Local: Mon, Nov 13 2006 10:57 am
Subject: Re: [Mephisto] Re: Admin site with latest release - nil to string
On 11/13/06, Rick Olson <technowee...@gmail.com> wrote:

> On 11/13/06, Greg Newman <greg.carb...@gmail.com> wrote:
> > I do Mislav, unfortunately, I wouldn't have had a fix for that one myself.
> > :)

Oh BTW, can you try the latest mephisto edge or 0.7 stable (whichever
svn you used, doesn't matter).  If not, you can probably just use this
file: http://svn.techno-weenie.net/projects/mephisto/trunk/lib/authenticate...

--
Rick Olson
http://weblog.techno-weenie.net
http://mephistoblog.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.
Greg Newman  
View profile
 More options Nov 13 2006, 11:02 am
From: "Greg Newman" <greg.carb...@gmail.com>
Date: Mon, 13 Nov 2006 11:02:11 -0500
Local: Mon, Nov 13 2006 11:02 am
Subject: Re: [Mephisto] Re: Admin site with latest release - nil to string

I'm on 1.8.4 Rick.

On 11/13/06, Rick Olson <technowee...@gmail.com> wrote:

--

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