Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Re: [yogi] Decide if plugin executed on admin interface or website?

Quote Reply
Re: [yogi] Decide if plugin executed on admin interface or website? In reply to
It happened, that I had to rename my admin.cgi, because somebody tried to hack it. My rule is: it is better to avoid the possibility that hacker can find the admin script and he can try to hack it.
So if I rename admin.cgi, I will have to change all references to "admin.cgi".

In my old modified Links 2.0, I solved it by setting an $admin global at the beginning of admin.cgi, so I was later able to check, if I'm in admin process or not. If we are in admin, display additional info, if not do not display anything, just log into error file if error occured.

That was the logic I used in Links 2.0.
Same should work in Links SQL, too.

1) Solution of Paul works, but anytime later I may run in the problem I described
2) Wrapper function is good idea, but we still need to find out if we are in admin or not.
I do not want to create 2 functions of everything I do (1 for admin, 1 for site), since it would offend against the reusable codes rules.

The truth is, the solution what Andy and Paul suggested is not bad, but I wanted to look for an internal solution if there exists such.
I was also lazy a bit to look for internal solutions in the core code. Wink
But I may have to check it.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Subject Author Views Date
Thread; hot thread Decide if plugin executed on admin interface or website? webmaster33 10768 Sep 5, 2002, 3:47 AM
Thread; hot thread Re: [webmaster33] Decide if plugin executed on admin interface or website?
Andy 10338 Sep 5, 2002, 3:52 AM
Thread; hot thread Re: [Andy] Decide if plugin executed on admin interface or website?
webmaster33 10320 Sep 5, 2002, 4:01 AM
Thread; hot thread Re: [webmaster33] Decide if plugin executed on admin interface or website?
Paul 10348 Sep 5, 2002, 4:05 AM
Thread; hot thread Re: [Paul] Decide if plugin executed on admin interface or website?
webmaster33 10376 Sep 5, 2002, 4:09 AM
Thread; hot thread Re: [webmaster33] Decide if plugin executed on admin interface or website?
Paul 10342 Sep 5, 2002, 4:19 AM
Thread; hot thread Re: [Paul] Decide if plugin executed on admin interface or website?
webmaster33 10304 Sep 5, 2002, 4:30 AM
Thread; hot thread Re: [webmaster33] Decide if plugin executed on admin interface or website?
Paul 10279 Sep 5, 2002, 5:07 AM
Post; hot thread Re: [Paul] Decide if plugin executed on admin interface or website?
webmaster33 10259 Sep 5, 2002, 5:15 AM
Thread; hot thread Re: [webmaster33] Decide if plugin executed on admin interface or website?
yogi 10327 Sep 5, 2002, 4:23 AM
Thread; hot thread Re: [yogi] Decide if plugin executed on admin interface or website?
webmaster33 10367 Sep 5, 2002, 4:33 AM
Thread; hot thread Re: [webmaster33] Decide if plugin executed on admin interface or website?
yogi 10331 Sep 5, 2002, 4:41 AM
Thread; hot thread Re: [yogi] Decide if plugin executed on admin interface or website?
webmaster33 10327 Sep 5, 2002, 5:17 AM
Thread; hot thread Re: [webmaster33] Decide if plugin executed on admin interface or website?
Paul 10270 Sep 5, 2002, 5:23 AM
Post; hot thread Re: [Paul] Decide if plugin executed on admin interface or website?
webmaster33 10325 Sep 5, 2002, 6:03 AM
Thread; hot thread Re: [webmaster33] Decide if plugin executed on admin interface or website?
Alex 10319 Sep 5, 2002, 1:10 PM
Thread; hot thread Re: [Alex] Decide if plugin executed on admin interface or website?
webmaster33 10232 Sep 6, 2002, 12:56 AM
Thread; hot thread Re: [webmaster33] Decide if plugin executed on admin interface or website?
Alex 10350 Sep 6, 2002, 10:50 AM
Thread; hot thread Re: [Alex] Decide if plugin executed on admin interface or website?
webmaster33 10343 Sep 6, 2002, 11:05 AM
Thread; hot thread Re: [webmaster33] Decide if plugin executed on admin interface or website?
Alex 10316 Sep 6, 2002, 11:09 AM
Post; hot thread Re: [Alex] Decide if plugin executed on admin interface or website?
webmaster33 10212 Sep 6, 2002, 11:12 AM