[ewiki] Re: Bug in binary hook
- From: Andy Fundinger <andy@xxxxxxxxxxx>
- To: "'ewiki@xxxxxxxxxxxxx'" <ewiki@xxxxxxxxxxxxx>
- Date: Mon, 22 Dec 2003 09:36:57 -0500
Ok I got some tracking on this bug, looks like the ewiki_auth is passing on
as an admin ring. Should ['perm_query'] plugins pay special attention to
$ring===0 or would it be more appropriate to have them recheck the flags?
Also, I'm still trying to break down the original code, do the comments on
this code explain it properly? It's the original code with ands converted
to nested ifs.
#-- stop here if disabled page
if (!empty($data["flags"])) { # if there are flags
if (($data["flags"] & EWIKI_DB_F_TYPE) != EWIKI_DB_F_TEXT) { # and
the text flag is not set
if (!EWIKI_PROTECTED_MODE || !ewiki_auth($id, $data, $action, 0, 1)
&& ($ewiki_ring!=0)) { #and protected mode is off or you are not
# authorized as an admin for this action
# and the ring has not been set to 0
#-- eventually handle binary data
if (($data["flags"] & EWIKI_DB_F_BINARY) && ($pf =
$ewiki_plugins["action_binary"][$action])) { #if there is a binary plugin
return($pf($id, $data, $action));
# run it
}
else {
return(ewiki_t("DISABLEDPAGE"));
#fail to a disabled page
}
}
}
}
> -----Original Message-----
> From: Andy Fundinger [mailto:andy@xxxxxxxxxxx]
> Sent: Wednesday, December 17, 2003 7:46 PM
> To: 'ewiki@xxxxxxxxxxxxx'
> Subject: [ewiki] Bug in binary hook
>
> Just an early report that I'm seeing a bug in the new binary hook, I added
> $ewiki_plugins["action_binary"]["info"] = "ewiki_page_info"; to my config
> file and now all actions are allowed to run on the page. I have to leave
> for the day so I'll refactor the code and investigate tomorrow.
>
> Andy
>
>
>
> _________________________________________________
> Scanned on 18 Dec 2003 01:45:38
> Scanning by http://erado.com
- Follow-Ups:
- [ewiki] ["handler_binary"][0] and plugins/lib/*.*
- From: Mario Salzer
Other related posts:
- » [ewiki] Bug in binary hook
- » [ewiki] Re: Bug in binary hook
- [ewiki] ["handler_binary"][0] and plugins/lib/*.*
- From: Mario Salzer