org.jscience.architecture.lift
Class EntryPoint
java.lang.Object
org.jscience.architecture.lift.EntryPoint
public class EntryPoint
- extends java.lang.Object
This file is licensed under the GNU Public Licens (GPL).
This is the main file of JLESA. It creates the World and the
necessary Cars, CAs, PassengerGenerators, PassengerProcessors, GUIs, etc.
|
Method Summary |
static boolean |
goodFileName(java.lang.String FileName,
java.lang.String Directory)
A little util method that checks if the FileName is
really located in the Directory to prevent {@code
"../../.. |
static void |
main(java.lang.String[] Args)
Args[0] and Args[1] are parsed. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EntryPoint
public EntryPoint()
main
public static void main(java.lang.String[] Args)
Args[0] and Args[1] are parsed. They must
contain either -f or an XML config file name.
- Parameters:
Args - DOCUMENT ME!
goodFileName
public static boolean goodFileName(java.lang.String FileName,
java.lang.String Directory)
- A little util method that checks if the
FileName is
really located in the Directory to prevent "../../../vmlinuz" attacks and other nasty things. It has only a
special use to check filenames in config files to protect the careless
user from malicous or malformed config files (even from config viruses :).
goodFileName("A","B") returns true if the Canonical Path
of A starts with B.
Note that some getCanonicalPath() implementations are known to
be broken. goodFileName("../test.txt",X) returns false
for any X I know It returns true in case of broken symlinks even when it should return false.
- Parameters:
FileName - DOCUMENT ME!Directory - DOCUMENT ME!
- Returns:
- DOCUMENT ME!