Re: [Tikiwiki-cvs/svn] SF.net SVN: tikiwiki: [13437] branches/1.10

View: New views
2 Messages — Rating Filter:   Alert me  

Parent Message unknown Re: [Tikiwiki-cvs/svn] SF.net SVN: tikiwiki: [13437] branches/1.10

by Jean-Marc Libs :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

What is the purpose of this ?

If the purpose is that the website should give back an HTTP 401 code
when people try to access a page, I don't think it's a good idea,
because it would presumably prompt the browser to display a basic http
authentication pop-up. As tikiwiki has it's own authentication
mechanism, I fail to understand the point.

Luckyly, my tests show that we still get an HTTP "200" code, even if
the page displays "Permission denied you cannot view this section"

--- starts tests---
libs@tirnanog:~/tmp$ wget http://localhost/~libs/test02/tiki-forums.php
--19:55:52--  http://localhost/~libs/test02/tiki-forums.php
          => `tiki-forums.php'
Résolution de localhost... 127.0.0.1
Connexion vers localhost|127.0.0.1|:80... connecté.
requête HTTP transmise, en attente de la réponse... 200 OK
Longueur: non spécifié [text/html]

   [ <=>

        ] 8 307         --.--K/s

19:55:52 (865.72 KB/s) - « tiki-forums.php » sauvegardé [8307]

libs@tirnanog:~/tmp$ grep -i permission tiki-forums.php
                                                       Permission
denied you cannot view this section
---/end tests---

So, what are we trying to achieve ?

Jyhem

On Fri, Jul 4, 2008 at 8:33 PM,  <sylvieg@...> wrote:
> Revision: 13437
>          http://tikiwiki.svn.sourceforge.net/tikiwiki/?rev=13437&view=rev
> Author:   sylvieg
> Date:     2008-07-04 11:33:34 -0700 (Fri, 04 Jul 2008)
>
> Log Message:
> -----------
> set smarty errortype to 401 if permission denied
>
[...]

>
> Modified: branches/1.10/tiki-forums.php
> ===================================================================
> --- branches/1.10/tiki-forums.php       2008-07-04 13:44:06 UTC (rev 13436)
> +++ branches/1.10/tiki-forums.php       2008-07-04 18:33:34 UTC (rev 13437)
> @@ -22,6 +22,7 @@
>  }
>
>  if ($tiki_p_forum_read != 'y') {
> +       $smarty->assign('errortype', 401);
>        $smarty->assign('msg', tra("Permission denied you cannot view this section"));
>
>        $smarty->display("error.tpl");
>

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Tikiwiki-devel mailing list
Tikiwiki-devel@...
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel

Re: [Tikiwiki-cvs/svn] SF.net SVN: tikiwiki: [13437] branches/1.10

by Jean-Marc Libs :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

OK, I understood what was the point.

It was explained in further commits (while I was doing tests and
writing my question).

Jyhem

On Sun, Jul 6, 2008 at 9:25 PM, Jean-Marc Libs <jeanmarc.libs@...> wrote:

> What is the purpose of this ?
>
> If the purpose is that the website should give back an HTTP 401 code
> when people try to access a page, I don't think it's a good idea,
> because it would presumably prompt the browser to display a basic http
> authentication pop-up. As tikiwiki has it's own authentication
> mechanism, I fail to understand the point.
>
> Luckyly, my tests show that we still get an HTTP "200" code, even if
> the page displays "Permission denied you cannot view this section"
>
> --- starts tests---
> libs@tirnanog:~/tmp$ wget http://localhost/~libs/test02/tiki-forums.php
> --19:55:52--  http://localhost/~libs/test02/tiki-forums.php
>          => `tiki-forums.php'
> Résolution de localhost... 127.0.0.1
> Connexion vers localhost|127.0.0.1|:80... connecté.
> requête HTTP transmise, en attente de la réponse... 200 OK
> Longueur: non spécifié [text/html]
>
>   [ <=>
>
>        ] 8 307         --.--K/s
>
> 19:55:52 (865.72 KB/s) - « tiki-forums.php » sauvegardé [8307]
>
> libs@tirnanog:~/tmp$ grep -i permission tiki-forums.php
>                                                       Permission
> denied you cannot view this section
> ---/end tests---
>
> So, what are we trying to achieve ?
>
> Jyhem
>
> On Fri, Jul 4, 2008 at 8:33 PM,  <sylvieg@...> wrote:
>> Revision: 13437
>>          http://tikiwiki.svn.sourceforge.net/tikiwiki/?rev=13437&view=rev
>> Author:   sylvieg
>> Date:     2008-07-04 11:33:34 -0700 (Fri, 04 Jul 2008)
>>
>> Log Message:
>> -----------
>> set smarty errortype to 401 if permission denied
>>
> [...]
>>
>> Modified: branches/1.10/tiki-forums.php
>> ===================================================================
>> --- branches/1.10/tiki-forums.php       2008-07-04 13:44:06 UTC (rev 13436)
>> +++ branches/1.10/tiki-forums.php       2008-07-04 18:33:34 UTC (rev 13437)
>> @@ -22,6 +22,7 @@
>>  }
>>
>>  if ($tiki_p_forum_read != 'y') {
>> +       $smarty->assign('errortype', 401);
>>        $smarty->assign('msg', tra("Permission denied you cannot view this section"));
>>
>>        $smarty->display("error.tpl");
>>
>

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Tikiwiki-devel mailing list
Tikiwiki-devel@...
https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel
LightInTheBox - Buy quality products at wholesale price