Re: Strange othAuth Problem - still

2006-08-30 Thread [EMAIL PROTECTED]

Apparently this is a bug in cake
http://cakebaker.wordpress.com/2006/08/28/dont-forget-to-exit-after-a-redirect/

daxroc's code at the pastebin is no longer online, but if you
understand the above you should be able to fix the holes without much
trouble (just add exit functions after every redirect ;))


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Strange othAuth Problem - still

2006-08-30 Thread [EMAIL PROTECTED]

Sorry, it's not a bug in cake, it's a feature ^^
just read the comments in the post above
as john says in comment 8, the best way is probably to use return();
that way you don't kill the execution, but you stop the current
function from executing, and that's what you want.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: Strange othAuth Problem - still

2006-08-30 Thread HalfBaked

Let me start by saying Thanks.

I found two  $this-redirect statements within the check() function.  I
added exit(); after these two redirects and the problem seems to have
been corrected.

I also determined that I did NOT want to add the exit function to Every
redirect as you stated...  When I had an exit(); after the redirect
that appears in the logout function, I would get a blank page after
logging out instead of being redirected to /pages/home like I was
expecting.
I also removed  exit(); after the redirect that appears in the login
function.  I am not sure if this had any adverse effects...

Again, Thank You Very Much...


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: strange othAuth problem

2006-07-17 Thread yeastinflexion

i was reading:
http://groups.google.com/group/cake-php/browse_thread/thread/5a4d967ba6c61b5a/b49aadf718b54165?q=beforefilterrnum=3#b49aadf718b54165
...and it sounds like a similar problem. does that mean that code is
still being run for some reason even after the check has been
performed?

based on this assumption i think i solved this issue but i want to know
from CraZyLegs or anyone else who knows if this is an appropriate fix.
i had to encapsulate the check() call with a if (!check()) {die();} is
that appropriate? it solved the problem so maybe the installation
readme or the check function itself should be changed to stop running
code? or was i just supposed to think this was obvious (i know that a
lot of times code snippets are just rough examples, but many people use
the othAuth readmy verbatim so i'm concerned if this is a problem of
not adding an exit() then a lot of people might not be because i see a
lot of posted code that is exacly like mine -- no exit() -- and i was
having this problem and so was daxroc, maybe other people just haven't
tested it)


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: strange othAuth problem

2006-07-11 Thread yeastinflexion

i also tested this with the $othAuthRestrictions applied to
app_controller or individual controllers... same effect.

does nobody else have this problem?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: strange othAuth problem

2006-07-05 Thread yeastinflexion

i just discovered that there is another similar problem with any
action. for example, if you wait long enough for the session to expire,
but then you hit say, Save, the save will commit before you are
redirected to the login page.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: strange othAuth problem

2006-07-01 Thread CraZyLeGs

?!
Paste something to reproduce that please ( in the bin ) just give a
link here


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: strange othAuth problem

2006-07-01 Thread daxroc

//Set restrictions as below Note dont use preceeding or leading slashes
var $othAuthRestrictions =array(
'add',
'edit',
'delete'
);

function beforeFilter()
{
parent::beforeFilter();
}

function delete($id) {
$this-Article-del($id);
//$this-flash('Article deleted.',
$this-viewPath.'/articles/index');
$this-redirect('/articles/index');
}

permissions are
controller/delete
controller/add
controller/edit

add and edit work perfect but delete altho restricted can be called by
anyone
as you can see from the above code i have tested it with a flash but
its still being deleted, before the redirect to the login ?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---



Re: strange othAuth problem

2006-07-01 Thread yeastinflexion

http://cakephp.org/pastes/show/e6bed617b04b2021f2d907dce2f87eaa


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~--~~~~--~~--~--~---