Hi!!
    I have written a SimpleDomainFilter class to use with
Swiki Beta 9, "Four Strong Winds"/Comanche Beta 4.5.

The zip contains some actions/templates to use with the new class (I
suggest you to study the code before do *any * change!)
It is a work in progress, and I'd like your comments about it....
Thank you!!

>From SimpleDomainFilter class comment:

This class implements a very very simple domain filter for a Swiki.
For configuring your allowed IP, do these steps:
1) edit the class method pvtBuildDefaultInstance, and add your preferred
hosts.
This method is private, so none can call it accidentally.
2) Execute (do) this (very very important!!):
 SimpleDomainFilter destroySingleton default explore
3) Check if the hostList contains the preferred host-patterns, if not go
to step 1 and retry.
4) Redefine ALL THE  addresses using syntax like this (your
configuration can vary of course, take care of the differences!!):

(SimpleDomainFilter isAllowed: request)
ifFalse: [
 book  formatBookTemplate: 'forbidden' request: request.
]
ifTrue:[
.... original code of your address....
]

5) You should modify all the addresses to take into account this
security stuff!!
Security is not so easy to guarantee at this level...so be aware of
security holes....
This is a simple hack. In the future I will provide a more powerful
security Module!!
Note: This instruction are for Comanche/Swiki Beta 9 but can work for
previous swiki too. Be care of what you are doing and do a lot of
tests!!
[....]

--
// Giovanni  Giorgi
//  http://www.egroups.com/group/powertalk/info.html
\\ mailto: [EMAIL PROTECTED]
// GSM: +39-347-3076-419
//    First they ignore you, then they laugh at you,
//   then they fight you, then you win.
//  - Mahatma Ghandi


SimpleDomainFilter-0.1.zip

Reply via email to