Should this function this?
public function isSecure()
{
$pathArray = $this->getPathInfoArray();
return (
(isset($pathArray['HTTPS']) && strtolower($pathArray['HTTPS'])
== 'on')
||
(isset($pathArray['HTTP_X_FORWARDED_PROTO']) && strtolower
($pathArray['HTTP_X_FORWARDED_PROTO']) == 'https')
||
(strpos($this->getUri(), 'https') !== FALSE)
);
}
Fabien, would this be considered a bug in symfony? This function
seems to rely on something that may or may not be on the server.
- Jon
On Jul 3, 2007, at 9:28 AM, Jonathan H. Wage wrote:
>
> Maybe isSecure() should just look at the current protocol used in the
> request url?
>
> - Jo
> On Jul 3, 2007, at 9:22 AM, Scott Meves wrote:
>
>>
>> Jon, if you feel like modifying the isSecure() method while you are
>> at it, I can send you whatever additional information you need. I
>> couldn't find any standard docs about what determines the value of
>> these boolean server values (whether they are set to "on/off" or
>> "1/0"), but I know that on the webhost 1and1 I am seeing values of 1
>> or 0, not "on" or "off".
>>
>> I can send you a link to my phpinfo() on the web host if you are
>> curious to see.
>>
>> -Scott
>>
>>
>>
>> On Jul 3, 2007, at 10:00 AM, Jonathan H. Wage wrote:
>>
>>>
>>> I can fix this today and commit to svn if you like.
>>>
>>> - Jon
>>>
>>> On Jul 3, 2007, at 8:55 AM, Lukas Kahwe Smith wrote:
>>>
>>>>
>>>> Lukas Kahwe Smith wrote:
>>>>> Scott Meves wrote:
>>>>>> I had an issue with an infinite loop and the sfSslRequirement
>>>>>> plugin.
>>>>>>
>>>>>> The problem for me was that my web host wasn't reporting the
>>>>>> $_SERVER
>>>>>> ['HTTPS'] to 'on', but rather to the numeric value '1'. The
>>>>>> sfWebRequest->isSecure() method checks this value against the
>>>>>> string
>>>>>> 'on'.... and of course it was reporting back false even though
>>>>>> the
>>>>>> user was coming in through HTTPS.
>>>>>>
>>>>>> I had to override the isSecure method to accommodate other values
>>>>>> for
>>>>>> this server variable.
>>>>>
>>>>> Ok .. this should go into the actual code then. Can you file a bug
>>>>> report with patch?
>>>>
>>>> hmm .. maybe we should at any rate pass in some parameter to catch
>>>> this
>>>> loops inside the plugin itself?
>>>>
>>>> regards,
>>>> Lukas
>>>>
>>>>>
>>>
>>>
>>>>
>>
>>
>>>
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony developers" 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/symfony-devs?hl=en
-~----------~----~----~----~------~----~------~--~---