Compare commits

15 Commits

Author SHA1 Message Date
tomasz.sowa 099dd55d0c added: IP ban mechanism (not finished yet -- we need a winix function to remove a ban)
now after some incorrent login attempts your IP can be banned or blocked
       (see new config variables)


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@902 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-10-27 07:44:26 +00:00
tomasz.sowa 53b4175d00 added: plugin message: WINIX_CHECK_PLUGIN_ACCESS
this message is sent before calling MakePost() or MakeGet()
       if you return false (which is default) you can prevent the access
       to the resource
       



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@901 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-10-17 19:52:55 +00:00
tomasz.sowa 8aa6f08e08 updated: html (login and passwd)
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@900 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-10-17 06:48:48 +00:00
tomasz.sowa c5024598cb updated: html/css (added div.winix to templates)
now we have winix.css in common/winix directory
         it is automatically loaded by index_head_functions_add.html


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@898 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-10-17 06:00:00 +00:00
tomasz.sowa dfcf6b29c0 added: to misc:
bool IsWhite(const wchar_t * str, bool treat_new_line_as_white)
       bool IsWhite(const std::wstring & str, bool treat_new_line_as_white)
       return true if the whole string is white (or an empty string)
added: global variable in admin environment for an user: "display_name"
       if defined it is used to display an user's name instead of its login
       it is used in: void print_user_name(Info & i, User & user);
       (tickets, threads, cat function etc)





git-svn-id: svn://ttmath.org/publicrep/winix/trunk@895 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-09-26 07:18:32 +00:00
tomasz.sowa 7f48d1eb2e fixed: the way we check whether we need make the redirect from SSL to non SSL (or vice versa)
beforehand we didn't take into accout default winix functions



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@894 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-09-24 20:31:01 +00:00
tomasz.sowa eaa97995d2 fixed: we should check cur.request->function is not null (in5D app when testing ssl/nossl redirect)
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@893 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-09-24 18:59:08 +00:00
tomasz.sowa 14f997b844 added: need_ssl flag to FunctionBase
// try to use SSL
       // if in the config 'use_ssl' is true and 'use_ssl_only_for_logged_users' is true
       // then ssl is used only for logged users but sometimes there is a need to use
       // SSL even if noone is logged (for example for such functions like 'login' or 'adduser')
       // default: false
       // (this option is ignored if 'use_ssl' in the config is false)
       bool need_ssl;




git-svn-id: svn://ttmath.org/publicrep/winix/trunk@892 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-09-24 18:38:35 +00:00
tomasz.sowa 26e87b20b1 changed: in Crypt:
renamed Hash() -> HashBin()
         HashBin() is using a binary output from OpenSSL now
	 previously we are using the hex output and with the new OpenSSL version
         the text has additional characters and causes some problems
	 added: HashHex() - it is using the HashBin() and then converts the output
	 to hex format itself
	 



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@891 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-09-19 23:17:10 +00:00
tomasz.sowa 5cdf6eff36 added: to ticket plugin:
some messges:
// 
#define WINIX_PL_TICKET_PREPARE_TO_ADD_TICKET  4103

// a next ticket will be displayed
// in p1 you have a pointer to the Item struct
// this is call from tickets_tab ezc function
#define WINIX_PL_TICKET_TICKETS_TAB_IS_NEXT            4104

methods:
void ticket_meta_value(Info & i)
void tickets_tab_meta_value(Info & i)






git-svn-id: svn://ttmath.org/publicrep/winix/trunk@890 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-09-15 23:34:25 +00:00
tomasz.sowa 4ed535a3b7 added: to plugin ticket: message WINIX_PL_TICKET_LOAD_TICKETS
someone can send this message with a directory id
       and tickets will be loaded from the directory
       (and to display them you can use ezc functions)



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@889 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-09-14 23:48:39 +00:00
tomasz.sowa da15323c2f added: to plugin thread: message WINIX_PL_THREAD_CAN_MAKE_REDIRECT
(similar as for ticket)



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@888 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-09-14 07:14:54 +00:00
tomasz.sowa bd1f717b4c added: some methods in Dystem::Dirs (takes wchar_t * as an argument, now only std::wstring were)
changed: in plugin ticket: added message: WINIX_PL_TICKET_CAN_MAKE_REDIRECT
         it is sent at the end of POST request (editticket, createticket)
         if we can make a redirect (useful with AJAX)





git-svn-id: svn://ttmath.org/publicrep/winix/trunk@887 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-09-13 23:12:48 +00:00
tomasz.sowa 72013046fc added: Lock class -- locking resources by using Synchro object
the destructor automatically calls Unlock()



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@886 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-09-11 23:46:00 +00:00
tomasz.sowa 14ae19143f added: new ezc filter: fil_new_line_to_br
added: PutChar() methods to HtmlTextFilter and TexTextFilter



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@885 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-09-11 21:41:10 +00:00
151 changed files with 4023 additions and 3705 deletions
+204 -178
View File
@@ -16,9 +16,10 @@ app.o: ../db/dbitemcolumns.h ../core/user.h ../core/group.h
app.o: ../core/dircontainer.h ../core/ugcontainer.h log.h textstream.h
app.o: logmanipulators.h slog.h cur.h request.h error.h
app.o: ../templates/htmltextstream.h ../../pikotools/space/spacetojson.h
app.o: session.h user.h plugindata.h rebus.h mount.h ../templates/locale.h
app.o: ../notify/notify.h ../notify/notifypool.h ../templates/patterns.h
app.o: ../templates/locale.h ../templates/localefilter.h ../../ezc/src/ezc.h
app.o: session.h user.h plugindata.h rebus.h ipban.h mount.h
app.o: ../templates/locale.h ../notify/notify.h ../notify/notifypool.h
app.o: ../templates/patterns.h ../templates/locale.h
app.o: ../templates/localefilter.h ../../ezc/src/ezc.h
app.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h
app.o: ../../ezc/src/functions.h ../../ezc/src/funinfo.h
app.o: ../../ezc/src/stringconv.h ../notify/notifythread.h
@@ -26,7 +27,7 @@ app.o: ../core/basethread.h ../notify/templatesnotify.h ../core/config.h
app.o: ../core/users.h ugcontainer.h lastcontainer.h mounts.h mountparser.h
app.o: crypt.h run.h users.h groups.h group.h loadavg.h image.h
app.o: threadmanager.h timezones.h timezone.h sessionmanager.h
app.o: sessioncontainer.h ../functions/functions.h
app.o: sessioncontainer.h ipbancontainer.h ../functions/functions.h
app.o: ../functions/functionbase.h ../core/request.h ../core/system.h
app.o: ../core/synchro.h ../functions/functionparser.h ../core/cur.h
app.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h
@@ -62,7 +63,7 @@ compress.o: ../../pikotools/space/spaceparser.h ../../pikotools/space/space.h
compress.o: ../../pikotools/textstream/types.h htmlfilter.h
compress.o: ../templates/htmltextstream.h ../core/textstream.h misc.h
compress.o: ../../pikotools/utf8/utf8.h ../../pikotools/space/spacetojson.h
compress.o: session.h user.h plugindata.h rebus.h mount.h
compress.o: session.h user.h plugindata.h rebus.h ipban.h mount.h
compress.o: ../templates/locale.h
config.o: config.h ../../pikotools/space/spaceparser.h
config.o: ../../pikotools/space/space.h ../../pikotools/textstream/types.h
@@ -76,22 +77,23 @@ config.o: ../../pikotools/textstream/types.h slog.h cur.h request.h
config.o: requesttypes.h item.h error.h ../templates/htmltextstream.h
config.o: ../core/textstream.h misc.h ../../pikotools/utf8/utf8.h
config.o: ../../pikotools/space/spacetojson.h session.h user.h plugindata.h
config.o: rebus.h mount.h ../templates/locale.h plugin.h pluginmsg.h system.h
config.o: job.h basethread.h synchro.h dirs.h dircontainer.h ../db/db.h
config.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h ../core/error.h
config.o: ../db/dbitemquery.h ../core/item.h ../db/dbitemcolumns.h
config.o: ../core/user.h ../core/group.h ../core/dircontainer.h
config.o: ../core/ugcontainer.h ../notify/notify.h ../notify/notifypool.h
config.o: ../templates/patterns.h ../templates/locale.h
config.o: ../templates/localefilter.h ../../ezc/src/ezc.h
config.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h
config.o: ../../ezc/src/functions.h ../../ezc/src/funinfo.h
config.o: ../../ezc/src/stringconv.h ../notify/notifythread.h
config.o: ../core/basethread.h ../notify/templatesnotify.h ../core/config.h
config.o: ../core/users.h ugcontainer.h lastcontainer.h mounts.h
config.o: mountparser.h crypt.h run.h users.h groups.h group.h loadavg.h
config.o: image.h threadmanager.h timezones.h timezone.h sessionmanager.h
config.o: sessioncontainer.h ../functions/functions.h
config.o: rebus.h ipban.h mount.h ../templates/locale.h plugin.h pluginmsg.h
config.o: system.h job.h basethread.h synchro.h dirs.h dircontainer.h
config.o: ../db/db.h ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h
config.o: ../core/error.h ../db/dbitemquery.h ../core/item.h
config.o: ../db/dbitemcolumns.h ../core/user.h ../core/group.h
config.o: ../core/dircontainer.h ../core/ugcontainer.h ../notify/notify.h
config.o: ../notify/notifypool.h ../templates/patterns.h
config.o: ../templates/locale.h ../templates/localefilter.h
config.o: ../../ezc/src/ezc.h ../../ezc/src/generator.h
config.o: ../../ezc/src/pattern.h ../../ezc/src/functions.h
config.o: ../../ezc/src/funinfo.h ../../ezc/src/stringconv.h
config.o: ../notify/notifythread.h ../core/basethread.h
config.o: ../notify/templatesnotify.h ../core/config.h ../core/users.h
config.o: ugcontainer.h lastcontainer.h mounts.h mountparser.h crypt.h run.h
config.o: users.h groups.h group.h loadavg.h image.h threadmanager.h
config.o: timezones.h timezone.h sessionmanager.h sessioncontainer.h
config.o: ipbancontainer.h ../functions/functions.h
config.o: ../functions/functionbase.h ../core/request.h ../core/system.h
config.o: ../core/synchro.h ../functions/functionparser.h ../core/cur.h
config.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h
@@ -114,16 +116,15 @@ config.o: ../templates/patterns.h ../templates/changepatterns.h
config.o: ../templates/htmltextstream.h ../core/sessionmanager.h
crypt.o: crypt.h run.h config.h ../../pikotools/space/spaceparser.h
crypt.o: ../../pikotools/space/space.h ../../pikotools/textstream/types.h
crypt.o: htmlfilter.h user.h ../../pikotools/utf8/utf8.h misc.h item.h
crypt.o: htmlfilter.h user.h ../../pikotools/utf8/utf8.h log.h textstream.h
crypt.o: logmanipulators.h ../../pikotools/textstream/textstream.h
crypt.o: ../../pikotools/space/space.h ../../pikotools/date/date.h
crypt.o: requesttypes.h ../../pikotools/textstream/textstream.h
crypt.o: ../../pikotools/convert/convert.h ../../pikotools/convert/inttostr.h
crypt.o: ../../pikotools/membuffer/membuffer.h
crypt.o: ../../pikotools/textstream/types.h log.h textstream.h
crypt.o: logmanipulators.h slog.h cur.h request.h error.h
crypt.o: ../templates/htmltextstream.h ../core/textstream.h
crypt.o: ../../pikotools/space/spacetojson.h session.h plugindata.h rebus.h
crypt.o: mount.h ../templates/locale.h
crypt.o: ../../pikotools/textstream/types.h slog.h cur.h request.h
crypt.o: requesttypes.h item.h error.h ../templates/htmltextstream.h
crypt.o: ../core/textstream.h misc.h ../../pikotools/space/spacetojson.h
crypt.o: session.h plugindata.h rebus.h ipban.h mount.h ../templates/locale.h
dircontainer.o: dircontainer.h item.h ../../pikotools/space/space.h
dircontainer.o: ../../pikotools/date/date.h log.h textstream.h
dircontainer.o: logmanipulators.h ../../pikotools/textstream/textstream.h
@@ -138,7 +139,7 @@ dircontainer.o: ../../pikotools/textstream/types.h htmlfilter.h
dircontainer.o: ../templates/htmltextstream.h ../core/textstream.h misc.h
dircontainer.o: ../../pikotools/utf8/utf8.h
dircontainer.o: ../../pikotools/space/spacetojson.h session.h user.h
dircontainer.o: plugindata.h rebus.h mount.h ../templates/locale.h
dircontainer.o: plugindata.h rebus.h ipban.h mount.h ../templates/locale.h
dirs.o: dirs.h item.h ../../pikotools/space/space.h
dirs.o: ../../pikotools/date/date.h dircontainer.h ../db/db.h ../db/dbbase.h
dirs.o: ../db/dbconn.h ../db/dbtextstream.h ../core/textstream.h misc.h
@@ -153,9 +154,10 @@ dirs.o: ../core/user.h ../core/group.h ../core/dircontainer.h
dirs.o: ../core/ugcontainer.h log.h textstream.h logmanipulators.h slog.h
dirs.o: cur.h request.h error.h config.h htmlfilter.h
dirs.o: ../templates/htmltextstream.h ../../pikotools/space/spacetojson.h
dirs.o: session.h user.h plugindata.h rebus.h mount.h ../templates/locale.h
dirs.o: ../notify/notify.h ../notify/notifypool.h ../templates/patterns.h
dirs.o: ../templates/locale.h ../templates/localefilter.h ../../ezc/src/ezc.h
dirs.o: session.h user.h plugindata.h rebus.h ipban.h mount.h
dirs.o: ../templates/locale.h ../notify/notify.h ../notify/notifypool.h
dirs.o: ../templates/patterns.h ../templates/locale.h
dirs.o: ../templates/localefilter.h ../../ezc/src/ezc.h
dirs.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h
dirs.o: ../../ezc/src/functions.h ../../ezc/src/funinfo.h
dirs.o: ../../ezc/src/stringconv.h ../notify/notifythread.h
@@ -176,7 +178,8 @@ groups.o: ../core/user.h ../core/group.h ../core/dircontainer.h
groups.o: ../core/ugcontainer.h log.h textstream.h logmanipulators.h slog.h
groups.o: cur.h request.h error.h config.h htmlfilter.h
groups.o: ../templates/htmltextstream.h ../../pikotools/space/spacetojson.h
groups.o: session.h user.h plugindata.h rebus.h mount.h ../templates/locale.h
groups.o: session.h user.h plugindata.h rebus.h ipban.h mount.h
groups.o: ../templates/locale.h
htmlfilter.o: htmlfilter.h
httpsimpleparser.o: httpsimpleparser.h
image.o: image.h basethread.h synchro.h textstream.h ../db/db.h
@@ -194,8 +197,8 @@ image.o: ../core/user.h ../core/group.h ../core/dircontainer.h
image.o: ../core/ugcontainer.h log.h logmanipulators.h slog.h cur.h request.h
image.o: error.h config.h htmlfilter.h ../templates/htmltextstream.h
image.o: ../../pikotools/space/spacetojson.h session.h user.h plugindata.h
image.o: rebus.h mount.h ../templates/locale.h ../core/config.h system.h
image.o: job.h dirs.h dircontainer.h ../notify/notify.h
image.o: rebus.h ipban.h mount.h ../templates/locale.h ../core/config.h
image.o: system.h job.h dirs.h dircontainer.h ../notify/notify.h
image.o: ../notify/notifypool.h ../templates/patterns.h ../templates/locale.h
image.o: ../templates/localefilter.h ../../ezc/src/ezc.h
image.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h
@@ -205,26 +208,42 @@ image.o: ../core/basethread.h ../notify/templatesnotify.h ../core/users.h
image.o: ugcontainer.h lastcontainer.h mounts.h mountparser.h crypt.h run.h
image.o: users.h groups.h group.h loadavg.h threadmanager.h timezones.h
image.o: timezone.h plugin.h pluginmsg.h sessionmanager.h sessioncontainer.h
image.o: ../functions/functions.h ../functions/functionbase.h
image.o: ../core/request.h ../core/system.h ../core/synchro.h
image.o: ../functions/functionparser.h ../core/cur.h ../functions/adduser.h
image.o: ../functions/cat.h ../functions/chmod.h ../functions/privchanger.h
image.o: ../functions/chown.h ../functions/ckeditor.h ../functions/cp.h
image.o: ../functions/default.h ../functions/download.h ../functions/emacs.h
image.o: ../functions/env.h ../functions/last.h ../functions/login.h
image.o: ../functions/logout.h ../functions/ln.h ../functions/ls.h
image.o: ../functions/man.h ../functions/meta.h ../functions/mkdir.h
image.o: ../functions/mv.h ../functions/nicedit.h ../functions/node.h
image.o: ../functions/passwd.h ../functions/priv.h ../functions/pw.h
image.o: ../functions/reload.h ../functions/rm.h ../functions/rmuser.h
image.o: ../functions/sort.h ../functions/specialdefault.h
image.o: ../functions/stat.h ../functions/subject.h ../functions/template.h
image.o: ipbancontainer.h ../functions/functions.h
image.o: ../functions/functionbase.h ../core/request.h ../core/system.h
image.o: ../core/synchro.h ../functions/functionparser.h ../core/cur.h
image.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h
image.o: ../functions/privchanger.h ../functions/chown.h
image.o: ../functions/ckeditor.h ../functions/cp.h ../functions/default.h
image.o: ../functions/download.h ../functions/emacs.h ../functions/env.h
image.o: ../functions/last.h ../functions/login.h ../functions/logout.h
image.o: ../functions/ln.h ../functions/ls.h ../functions/man.h
image.o: ../functions/meta.h ../functions/mkdir.h ../functions/mv.h
image.o: ../functions/nicedit.h ../functions/node.h ../functions/passwd.h
image.o: ../functions/priv.h ../functions/pw.h ../functions/reload.h
image.o: ../functions/rm.h ../functions/rmuser.h ../functions/sort.h
image.o: ../functions/specialdefault.h ../functions/stat.h
image.o: ../functions/subject.h ../functions/template.h
image.o: ../functions/tinymce.h ../functions/uname.h ../functions/upload.h
image.o: ../functions/uptime.h ../functions/who.h ../functions/vim.h
image.o: ../core/htmlfilter.h ../templates/templates.h
image.o: ../templates/patterncacher.h ../templates/indexpatterns.h
image.o: ../templates/patterns.h ../templates/changepatterns.h
image.o: ../templates/htmltextstream.h ../core/sessionmanager.h
ipbancontainer.o: ipbancontainer.h ipban.h log.h textstream.h
ipbancontainer.o: logmanipulators.h ../../pikotools/textstream/textstream.h
ipbancontainer.o: ../../pikotools/space/space.h ../../pikotools/date/date.h
ipbancontainer.o: ../../pikotools/convert/convert.h
ipbancontainer.o: ../../pikotools/convert/inttostr.h
ipbancontainer.o: ../../pikotools/membuffer/membuffer.h
ipbancontainer.o: ../../pikotools/textstream/types.h slog.h cur.h request.h
ipbancontainer.o: requesttypes.h item.h error.h config.h
ipbancontainer.o: ../../pikotools/space/spaceparser.h
ipbancontainer.o: ../../pikotools/space/space.h
ipbancontainer.o: ../../pikotools/textstream/types.h htmlfilter.h
ipbancontainer.o: ../templates/htmltextstream.h ../core/textstream.h misc.h
ipbancontainer.o: ../../pikotools/utf8/utf8.h
ipbancontainer.o: ../../pikotools/space/spacetojson.h session.h user.h
ipbancontainer.o: plugindata.h rebus.h mount.h ../templates/locale.h
item.o: item.h ../../pikotools/space/space.h ../../pikotools/date/date.h
item.o: misc.h requesttypes.h ../../pikotools/textstream/textstream.h
item.o: ../../pikotools/convert/convert.h ../../pikotools/convert/inttostr.h
@@ -244,9 +263,9 @@ job.o: ../../pikotools/space/spaceparser.h ../../pikotools/space/space.h
job.o: ../../pikotools/textstream/types.h htmlfilter.h
job.o: ../templates/htmltextstream.h ../core/textstream.h misc.h
job.o: ../../pikotools/utf8/utf8.h ../../pikotools/space/spacetojson.h
job.o: session.h user.h plugindata.h rebus.h mount.h ../templates/locale.h
job.o: system.h dirs.h dircontainer.h ../db/db.h ../db/dbbase.h
job.o: ../db/dbconn.h ../db/dbtextstream.h ../core/error.h
job.o: session.h user.h plugindata.h rebus.h ipban.h mount.h
job.o: ../templates/locale.h system.h dirs.h dircontainer.h ../db/db.h
job.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h ../core/error.h
job.o: ../db/dbitemquery.h ../core/item.h ../db/dbitemcolumns.h
job.o: ../core/user.h ../core/group.h ../core/dircontainer.h
job.o: ../core/ugcontainer.h ../notify/notify.h ../notify/notifypool.h
@@ -259,7 +278,7 @@ job.o: ../core/basethread.h ../notify/templatesnotify.h ../core/config.h
job.o: ../core/users.h ugcontainer.h lastcontainer.h mounts.h mountparser.h
job.o: crypt.h run.h users.h groups.h group.h loadavg.h image.h
job.o: threadmanager.h timezones.h timezone.h sessionmanager.h
job.o: sessioncontainer.h ../functions/functions.h
job.o: sessioncontainer.h ipbancontainer.h ../functions/functions.h
job.o: ../functions/functionbase.h ../core/request.h ../core/system.h
job.o: ../core/synchro.h ../functions/functionparser.h ../core/cur.h
job.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h
@@ -295,7 +314,7 @@ lastcontainer.o: ../../pikotools/textstream/types.h htmlfilter.h
lastcontainer.o: ../templates/htmltextstream.h ../core/textstream.h misc.h
lastcontainer.o: ../../pikotools/utf8/utf8.h
lastcontainer.o: ../../pikotools/space/spacetojson.h session.h user.h
lastcontainer.o: plugindata.h rebus.h mount.h ../templates/locale.h
lastcontainer.o: plugindata.h rebus.h ipban.h mount.h ../templates/locale.h
loadavg.o: loadavg.h log.h textstream.h logmanipulators.h
loadavg.o: ../../pikotools/textstream/textstream.h
loadavg.o: ../../pikotools/space/space.h ../../pikotools/date/date.h
@@ -308,8 +327,9 @@ loadavg.o: ../../pikotools/space/spaceparser.h ../../pikotools/space/space.h
loadavg.o: ../../pikotools/textstream/types.h htmlfilter.h
loadavg.o: ../templates/htmltextstream.h ../core/textstream.h misc.h
loadavg.o: ../../pikotools/utf8/utf8.h ../../pikotools/space/spacetojson.h
loadavg.o: session.h user.h plugindata.h rebus.h mount.h
loadavg.o: session.h user.h plugindata.h rebus.h ipban.h mount.h
loadavg.o: ../templates/locale.h
lock.o: lock.h synchro.h
log.o: log.h textstream.h logmanipulators.h
log.o: ../../pikotools/textstream/textstream.h ../../pikotools/space/space.h
log.o: ../../pikotools/date/date.h ../../pikotools/convert/convert.h
@@ -321,8 +341,8 @@ log.o: ../../pikotools/space/spaceparser.h ../../pikotools/space/space.h
log.o: ../../pikotools/textstream/types.h htmlfilter.h
log.o: ../templates/htmltextstream.h ../core/textstream.h misc.h
log.o: ../../pikotools/utf8/utf8.h ../../pikotools/space/spacetojson.h
log.o: session.h user.h plugindata.h rebus.h mount.h ../templates/locale.h
log.o: timezones.h timezone.h
log.o: session.h user.h plugindata.h rebus.h ipban.h mount.h
log.o: ../templates/locale.h timezones.h timezone.h
misc.o: misc.h item.h ../../pikotools/space/space.h
misc.o: ../../pikotools/date/date.h requesttypes.h
misc.o: ../../pikotools/textstream/textstream.h
@@ -334,8 +354,9 @@ misc.o: config.h ../../pikotools/space/spaceparser.h
misc.o: ../../pikotools/space/space.h ../../pikotools/textstream/types.h
misc.o: htmlfilter.h ../templates/htmltextstream.h ../core/textstream.h
misc.o: ../../pikotools/space/spacetojson.h session.h user.h plugindata.h
misc.o: rebus.h mount.h ../templates/locale.h ../templates/templates.h
misc.o: ../../ezc/src/ezc.h ../../ezc/src/generator.h ../../ezc/src/pattern.h
misc.o: rebus.h ipban.h mount.h ../templates/locale.h
misc.o: ../templates/templates.h ../../ezc/src/ezc.h
misc.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h
misc.o: ../../ezc/src/functions.h ../../ezc/src/funinfo.h
misc.o: ../../ezc/src/stringconv.h ../templates/patterncacher.h
misc.o: ../core/item.h ../templates/indexpatterns.h ../templates/patterns.h
@@ -369,15 +390,15 @@ mountparser.o: ../core/group.h ../core/dircontainer.h ../core/ugcontainer.h
mountparser.o: log.h textstream.h logmanipulators.h slog.h cur.h request.h
mountparser.o: error.h config.h htmlfilter.h ../templates/htmltextstream.h
mountparser.o: ../../pikotools/space/spacetojson.h session.h user.h
mountparser.o: plugindata.h rebus.h ../templates/locale.h ../notify/notify.h
mountparser.o: ../notify/notifypool.h ../templates/patterns.h
mountparser.o: ../templates/locale.h ../templates/localefilter.h
mountparser.o: ../../ezc/src/ezc.h ../../ezc/src/generator.h
mountparser.o: ../../ezc/src/pattern.h ../../ezc/src/functions.h
mountparser.o: ../../ezc/src/funinfo.h ../../ezc/src/stringconv.h
mountparser.o: ../notify/notifythread.h ../core/basethread.h
mountparser.o: ../notify/templatesnotify.h ../core/config.h ../core/users.h
mountparser.o: ugcontainer.h lastcontainer.h
mountparser.o: plugindata.h rebus.h ipban.h ../templates/locale.h
mountparser.o: ../notify/notify.h ../notify/notifypool.h
mountparser.o: ../templates/patterns.h ../templates/locale.h
mountparser.o: ../templates/localefilter.h ../../ezc/src/ezc.h
mountparser.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h
mountparser.o: ../../ezc/src/functions.h ../../ezc/src/funinfo.h
mountparser.o: ../../ezc/src/stringconv.h ../notify/notifythread.h
mountparser.o: ../core/basethread.h ../notify/templatesnotify.h
mountparser.o: ../core/config.h ../core/users.h ugcontainer.h lastcontainer.h
mounts.o: mounts.h mount.h error.h dirs.h item.h
mounts.o: ../../pikotools/space/space.h ../../pikotools/date/date.h
mounts.o: dircontainer.h ../db/db.h ../db/dbbase.h ../db/dbconn.h
@@ -394,7 +415,7 @@ mounts.o: ../core/user.h ../core/group.h ../core/dircontainer.h
mounts.o: ../core/ugcontainer.h log.h textstream.h logmanipulators.h slog.h
mounts.o: cur.h request.h config.h htmlfilter.h ../templates/htmltextstream.h
mounts.o: ../../pikotools/space/spacetojson.h session.h user.h plugindata.h
mounts.o: rebus.h ../templates/locale.h ../notify/notify.h
mounts.o: rebus.h ipban.h ../templates/locale.h ../notify/notify.h
mounts.o: ../notify/notifypool.h ../templates/patterns.h
mounts.o: ../templates/locale.h ../templates/localefilter.h
mounts.o: ../../ezc/src/ezc.h ../../ezc/src/generator.h
@@ -405,7 +426,7 @@ mounts.o: ../notify/templatesnotify.h ../core/config.h ../core/users.h
mounts.o: ugcontainer.h lastcontainer.h mountparser.h plugin.h pluginmsg.h
mounts.o: system.h job.h basethread.h synchro.h crypt.h run.h users.h
mounts.o: groups.h group.h loadavg.h image.h threadmanager.h timezones.h
mounts.o: timezone.h sessionmanager.h sessioncontainer.h
mounts.o: timezone.h sessionmanager.h sessioncontainer.h ipbancontainer.h
mounts.o: ../functions/functions.h ../functions/functionbase.h
mounts.o: ../core/request.h ../core/system.h ../core/synchro.h
mounts.o: ../functions/functionparser.h ../core/cur.h ../functions/adduser.h
@@ -438,11 +459,11 @@ plugin.o: ../../pikotools/space/spaceparser.h ../../pikotools/space/space.h
plugin.o: ../../pikotools/textstream/types.h htmlfilter.h
plugin.o: ../templates/htmltextstream.h ../core/textstream.h misc.h
plugin.o: ../../pikotools/utf8/utf8.h ../../pikotools/space/spacetojson.h
plugin.o: session.h user.h plugindata.h rebus.h mount.h ../templates/locale.h
plugin.o: system.h job.h basethread.h synchro.h dirs.h dircontainer.h
plugin.o: ../db/db.h ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h
plugin.o: ../core/error.h ../db/dbitemquery.h ../core/item.h
plugin.o: ../db/dbitemcolumns.h ../core/user.h ../core/group.h
plugin.o: session.h user.h plugindata.h rebus.h ipban.h mount.h
plugin.o: ../templates/locale.h system.h job.h basethread.h synchro.h dirs.h
plugin.o: dircontainer.h ../db/db.h ../db/dbbase.h ../db/dbconn.h
plugin.o: ../db/dbtextstream.h ../core/error.h ../db/dbitemquery.h
plugin.o: ../core/item.h ../db/dbitemcolumns.h ../core/user.h ../core/group.h
plugin.o: ../core/dircontainer.h ../core/ugcontainer.h ../notify/notify.h
plugin.o: ../notify/notifypool.h ../templates/patterns.h
plugin.o: ../templates/locale.h ../templates/localefilter.h
@@ -454,20 +475,21 @@ plugin.o: ../notify/templatesnotify.h ../core/config.h ../core/users.h
plugin.o: ugcontainer.h lastcontainer.h mounts.h mountparser.h crypt.h run.h
plugin.o: users.h groups.h group.h loadavg.h image.h threadmanager.h
plugin.o: timezones.h timezone.h sessionmanager.h sessioncontainer.h
plugin.o: ../functions/functions.h ../functions/functionbase.h
plugin.o: ../core/request.h ../core/system.h ../core/synchro.h
plugin.o: ../functions/functionparser.h ../core/cur.h ../functions/adduser.h
plugin.o: ../functions/cat.h ../functions/chmod.h ../functions/privchanger.h
plugin.o: ../functions/chown.h ../functions/ckeditor.h ../functions/cp.h
plugin.o: ../functions/default.h ../functions/download.h ../functions/emacs.h
plugin.o: ../functions/env.h ../functions/last.h ../functions/login.h
plugin.o: ../functions/logout.h ../functions/ln.h ../functions/ls.h
plugin.o: ../functions/man.h ../functions/meta.h ../functions/mkdir.h
plugin.o: ../functions/mv.h ../functions/nicedit.h ../functions/node.h
plugin.o: ../functions/passwd.h ../functions/priv.h ../functions/pw.h
plugin.o: ../functions/reload.h ../functions/rm.h ../functions/rmuser.h
plugin.o: ../functions/sort.h ../functions/specialdefault.h
plugin.o: ../functions/stat.h ../functions/subject.h ../functions/template.h
plugin.o: ipbancontainer.h ../functions/functions.h
plugin.o: ../functions/functionbase.h ../core/request.h ../core/system.h
plugin.o: ../core/synchro.h ../functions/functionparser.h ../core/cur.h
plugin.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h
plugin.o: ../functions/privchanger.h ../functions/chown.h
plugin.o: ../functions/ckeditor.h ../functions/cp.h ../functions/default.h
plugin.o: ../functions/download.h ../functions/emacs.h ../functions/env.h
plugin.o: ../functions/last.h ../functions/login.h ../functions/logout.h
plugin.o: ../functions/ln.h ../functions/ls.h ../functions/man.h
plugin.o: ../functions/meta.h ../functions/mkdir.h ../functions/mv.h
plugin.o: ../functions/nicedit.h ../functions/node.h ../functions/passwd.h
plugin.o: ../functions/priv.h ../functions/pw.h ../functions/reload.h
plugin.o: ../functions/rm.h ../functions/rmuser.h ../functions/sort.h
plugin.o: ../functions/specialdefault.h ../functions/stat.h
plugin.o: ../functions/subject.h ../functions/template.h
plugin.o: ../functions/tinymce.h ../functions/uname.h ../functions/upload.h
plugin.o: ../functions/uptime.h ../functions/who.h ../functions/vim.h
plugin.o: ../core/htmlfilter.h ../templates/templates.h
@@ -487,9 +509,9 @@ plugindata.o: ../../pikotools/space/space.h
plugindata.o: ../../pikotools/textstream/types.h htmlfilter.h
plugindata.o: ../templates/htmltextstream.h ../core/textstream.h misc.h
plugindata.o: ../../pikotools/utf8/utf8.h ../../pikotools/space/spacetojson.h
plugindata.o: session.h user.h rebus.h mount.h ../templates/locale.h system.h
plugindata.o: job.h basethread.h synchro.h dirs.h dircontainer.h ../db/db.h
plugindata.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h
plugindata.o: session.h user.h rebus.h ipban.h mount.h ../templates/locale.h
plugindata.o: system.h job.h basethread.h synchro.h dirs.h dircontainer.h
plugindata.o: ../db/db.h ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h
plugindata.o: ../core/error.h ../db/dbitemquery.h ../core/item.h
plugindata.o: ../db/dbitemcolumns.h ../core/user.h ../core/group.h
plugindata.o: ../core/dircontainer.h ../core/ugcontainer.h ../notify/notify.h
@@ -503,7 +525,7 @@ plugindata.o: ../notify/templatesnotify.h ../core/config.h ../core/users.h
plugindata.o: ugcontainer.h lastcontainer.h mounts.h mountparser.h crypt.h
plugindata.o: run.h users.h groups.h group.h loadavg.h image.h
plugindata.o: threadmanager.h timezones.h timezone.h sessionmanager.h
plugindata.o: sessioncontainer.h ../functions/functions.h
plugindata.o: sessioncontainer.h ipbancontainer.h ../functions/functions.h
plugindata.o: ../functions/functionbase.h ../core/request.h ../core/system.h
plugindata.o: ../core/synchro.h ../functions/functionparser.h ../core/cur.h
plugindata.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h
@@ -540,7 +562,7 @@ postmultiparser.o: item.h ../../pikotools/utf8/utf8.h log.h textstream.h
postmultiparser.o: logmanipulators.h slog.h cur.h request.h
postmultiparser.o: ../templates/htmltextstream.h ../core/textstream.h
postmultiparser.o: ../../pikotools/space/spacetojson.h session.h user.h
postmultiparser.o: plugindata.h rebus.h mount.h ../templates/locale.h
postmultiparser.o: plugindata.h rebus.h ipban.h mount.h ../templates/locale.h
rebus.o: log.h textstream.h logmanipulators.h
rebus.o: ../../pikotools/textstream/textstream.h
rebus.o: ../../pikotools/space/space.h ../../pikotools/date/date.h
@@ -552,7 +574,8 @@ rebus.o: ../../pikotools/space/spaceparser.h ../../pikotools/space/space.h
rebus.o: ../../pikotools/textstream/types.h htmlfilter.h
rebus.o: ../templates/htmltextstream.h ../core/textstream.h misc.h
rebus.o: ../../pikotools/utf8/utf8.h ../../pikotools/space/spacetojson.h
rebus.o: session.h user.h plugindata.h rebus.h mount.h ../templates/locale.h
rebus.o: session.h user.h plugindata.h rebus.h ipban.h mount.h
rebus.o: ../templates/locale.h
request.o: request.h requesttypes.h ../../pikotools/textstream/textstream.h
request.o: ../../pikotools/space/space.h ../../pikotools/date/date.h
request.o: ../../pikotools/convert/convert.h
@@ -564,7 +587,7 @@ request.o: ../../pikotools/textstream/types.h htmlfilter.h textstream.h
request.o: ../templates/htmltextstream.h ../core/textstream.h misc.h
request.o: ../../pikotools/utf8/utf8.h ../../pikotools/space/spacetojson.h
request.o: log.h logmanipulators.h slog.h cur.h session.h user.h plugindata.h
request.o: rebus.h mount.h ../templates/locale.h plugin.h pluginmsg.h
request.o: rebus.h ipban.h mount.h ../templates/locale.h plugin.h pluginmsg.h
request.o: system.h job.h basethread.h synchro.h dirs.h dircontainer.h
request.o: ../db/db.h ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h
request.o: ../core/error.h ../db/dbitemquery.h ../core/item.h
@@ -580,19 +603,19 @@ request.o: ../notify/templatesnotify.h ../core/config.h ../core/users.h
request.o: ugcontainer.h lastcontainer.h mounts.h mountparser.h crypt.h run.h
request.o: users.h groups.h group.h loadavg.h image.h threadmanager.h
request.o: timezones.h timezone.h sessionmanager.h sessioncontainer.h
request.o: ../functions/functions.h ../functions/functionbase.h
request.o: ../core/request.h ../core/system.h ../core/synchro.h
request.o: ../functions/functionparser.h ../core/cur.h ../functions/adduser.h
request.o: ../functions/cat.h ../functions/chmod.h ../functions/privchanger.h
request.o: ../functions/chown.h ../functions/ckeditor.h ../functions/cp.h
request.o: ../functions/default.h ../functions/download.h
request.o: ../functions/emacs.h ../functions/env.h ../functions/last.h
request.o: ../functions/login.h ../functions/logout.h ../functions/ln.h
request.o: ../functions/ls.h ../functions/man.h ../functions/meta.h
request.o: ../functions/mkdir.h ../functions/mv.h ../functions/nicedit.h
request.o: ../functions/node.h ../functions/passwd.h ../functions/priv.h
request.o: ../functions/pw.h ../functions/reload.h ../functions/rm.h
request.o: ../functions/rmuser.h ../functions/sort.h
request.o: ipbancontainer.h ../functions/functions.h
request.o: ../functions/functionbase.h ../core/request.h ../core/system.h
request.o: ../core/synchro.h ../functions/functionparser.h ../core/cur.h
request.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h
request.o: ../functions/privchanger.h ../functions/chown.h
request.o: ../functions/ckeditor.h ../functions/cp.h ../functions/default.h
request.o: ../functions/download.h ../functions/emacs.h ../functions/env.h
request.o: ../functions/last.h ../functions/login.h ../functions/logout.h
request.o: ../functions/ln.h ../functions/ls.h ../functions/man.h
request.o: ../functions/meta.h ../functions/mkdir.h ../functions/mv.h
request.o: ../functions/nicedit.h ../functions/node.h ../functions/passwd.h
request.o: ../functions/priv.h ../functions/pw.h ../functions/reload.h
request.o: ../functions/rm.h ../functions/rmuser.h ../functions/sort.h
request.o: ../functions/specialdefault.h ../functions/stat.h
request.o: ../functions/subject.h ../functions/template.h
request.o: ../functions/tinymce.h ../functions/uname.h ../functions/upload.h
@@ -612,10 +635,11 @@ run.o: ../../pikotools/space/spaceparser.h ../../pikotools/space/space.h
run.o: ../../pikotools/textstream/types.h htmlfilter.h
run.o: ../templates/htmltextstream.h ../core/textstream.h misc.h
run.o: ../../pikotools/utf8/utf8.h ../../pikotools/space/spacetojson.h
run.o: session.h user.h plugindata.h rebus.h mount.h ../templates/locale.h
run.o: session.h user.h plugindata.h rebus.h ipban.h mount.h
run.o: ../templates/locale.h
session.o: session.h item.h ../../pikotools/space/space.h
session.o: ../../pikotools/date/date.h error.h user.h plugindata.h rebus.h
session.o: textstream.h misc.h requesttypes.h
session.o: textstream.h ipban.h misc.h requesttypes.h
session.o: ../../pikotools/textstream/textstream.h
session.o: ../../pikotools/convert/convert.h
session.o: ../../pikotools/convert/inttostr.h
@@ -623,8 +647,8 @@ session.o: ../../pikotools/membuffer/membuffer.h
session.o: ../../pikotools/textstream/types.h ../../pikotools/utf8/utf8.h
sessioncontainer.o: sessioncontainer.h session.h item.h
sessioncontainer.o: ../../pikotools/space/space.h ../../pikotools/date/date.h
sessioncontainer.o: error.h user.h plugindata.h rebus.h textstream.h cur.h
sessioncontainer.o: request.h requesttypes.h
sessioncontainer.o: error.h user.h plugindata.h rebus.h textstream.h ipban.h
sessioncontainer.o: cur.h request.h requesttypes.h
sessioncontainer.o: ../../pikotools/textstream/textstream.h
sessioncontainer.o: ../../pikotools/convert/convert.h
sessioncontainer.o: ../../pikotools/convert/inttostr.h
@@ -639,8 +663,8 @@ sessioncontainer.o: ../../pikotools/space/spacetojson.h mount.h log.h
sessioncontainer.o: logmanipulators.h slog.h ../templates/locale.h
sessionmanager.o: sessionmanager.h sessioncontainer.h session.h item.h
sessionmanager.o: ../../pikotools/space/space.h ../../pikotools/date/date.h
sessionmanager.o: error.h user.h plugindata.h rebus.h textstream.h cur.h
sessionmanager.o: request.h requesttypes.h
sessionmanager.o: error.h user.h plugindata.h rebus.h textstream.h ipban.h
sessionmanager.o: cur.h request.h requesttypes.h
sessionmanager.o: ../../pikotools/textstream/textstream.h
sessionmanager.o: ../../pikotools/convert/convert.h
sessionmanager.o: ../../pikotools/convert/inttostr.h
@@ -651,27 +675,27 @@ sessionmanager.o: ../../pikotools/space/space.h
sessionmanager.o: ../../pikotools/textstream/types.h htmlfilter.h
sessionmanager.o: ../templates/htmltextstream.h ../core/textstream.h misc.h
sessionmanager.o: ../../pikotools/utf8/utf8.h
sessionmanager.o: ../../pikotools/space/spacetojson.h mount.h lastcontainer.h
sessionmanager.o: system.h job.h basethread.h synchro.h dirs.h dircontainer.h
sessionmanager.o: ../db/db.h ../db/dbbase.h ../db/dbconn.h
sessionmanager.o: ../db/dbtextstream.h ../core/error.h ../db/dbitemquery.h
sessionmanager.o: ../core/item.h ../db/dbitemcolumns.h ../core/user.h
sessionmanager.o: ../core/group.h ../core/dircontainer.h
sessionmanager.o: ../core/ugcontainer.h log.h logmanipulators.h slog.h
sessionmanager.o: ../templates/locale.h ../notify/notify.h
sessionmanager.o: ../notify/notifypool.h ../templates/patterns.h
sessionmanager.o: ../templates/locale.h ../templates/localefilter.h
sessionmanager.o: ../../ezc/src/ezc.h ../../ezc/src/generator.h
sessionmanager.o: ../../ezc/src/pattern.h ../../ezc/src/functions.h
sessionmanager.o: ../../ezc/src/funinfo.h ../../ezc/src/stringconv.h
sessionmanager.o: ../notify/notifythread.h ../core/basethread.h
sessionmanager.o: ../notify/templatesnotify.h ../core/config.h
sessionmanager.o: ../core/users.h ugcontainer.h mounts.h mountparser.h
sessionmanager.o: crypt.h run.h users.h groups.h group.h loadavg.h image.h
sessionmanager.o: threadmanager.h timezones.h timezone.h sessionparser.h
sessionmanager.o: plugin.h pluginmsg.h ../functions/functions.h
sessionmanager.o: ../functions/functionbase.h ../core/request.h
sessionmanager.o: ../core/system.h ../core/synchro.h
sessionmanager.o: ../../pikotools/space/spacetojson.h mount.h
sessionmanager.o: ipbancontainer.h lastcontainer.h system.h job.h
sessionmanager.o: basethread.h synchro.h dirs.h dircontainer.h ../db/db.h
sessionmanager.o: ../db/dbbase.h ../db/dbconn.h ../db/dbtextstream.h
sessionmanager.o: ../core/error.h ../db/dbitemquery.h ../core/item.h
sessionmanager.o: ../db/dbitemcolumns.h ../core/user.h ../core/group.h
sessionmanager.o: ../core/dircontainer.h ../core/ugcontainer.h log.h
sessionmanager.o: logmanipulators.h slog.h ../templates/locale.h
sessionmanager.o: ../notify/notify.h ../notify/notifypool.h
sessionmanager.o: ../templates/patterns.h ../templates/locale.h
sessionmanager.o: ../templates/localefilter.h ../../ezc/src/ezc.h
sessionmanager.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h
sessionmanager.o: ../../ezc/src/functions.h ../../ezc/src/funinfo.h
sessionmanager.o: ../../ezc/src/stringconv.h ../notify/notifythread.h
sessionmanager.o: ../core/basethread.h ../notify/templatesnotify.h
sessionmanager.o: ../core/config.h ../core/users.h ugcontainer.h mounts.h
sessionmanager.o: mountparser.h crypt.h run.h users.h groups.h group.h
sessionmanager.o: loadavg.h image.h threadmanager.h timezones.h timezone.h
sessionmanager.o: sessionparser.h plugin.h pluginmsg.h
sessionmanager.o: ../functions/functions.h ../functions/functionbase.h
sessionmanager.o: ../core/request.h ../core/system.h ../core/synchro.h
sessionmanager.o: ../functions/functionparser.h ../core/cur.h
sessionmanager.o: ../functions/adduser.h ../functions/cat.h
sessionmanager.o: ../functions/chmod.h ../functions/privchanger.h
@@ -696,7 +720,7 @@ sessionmanager.o: ../templates/changepatterns.h ../templates/htmltextstream.h
sessionmanager.o: ../core/sessionmanager.h
sessionparser.o: sessionparser.h session.h item.h
sessionparser.o: ../../pikotools/space/space.h ../../pikotools/date/date.h
sessionparser.o: error.h user.h plugindata.h rebus.h textstream.h
sessionparser.o: error.h user.h plugindata.h rebus.h textstream.h ipban.h
sessionparser.o: sessioncontainer.h cur.h request.h requesttypes.h
sessionparser.o: ../../pikotools/textstream/textstream.h
sessionparser.o: ../../pikotools/convert/convert.h
@@ -720,8 +744,8 @@ slog.o: ../../pikotools/space/spaceparser.h ../../pikotools/space/space.h
slog.o: ../../pikotools/textstream/types.h htmlfilter.h textstream.h
slog.o: ../templates/htmltextstream.h ../core/textstream.h misc.h
slog.o: ../../pikotools/utf8/utf8.h ../../pikotools/space/spacetojson.h
slog.o: session.h user.h plugindata.h rebus.h mount.h logmanipulators.h
slog.o: ../templates/locale.h
slog.o: session.h user.h plugindata.h rebus.h ipban.h mount.h
slog.o: logmanipulators.h ../templates/locale.h
synchro.o: synchro.h
system.o: system.h job.h basethread.h synchro.h ../../pikotools/space/space.h
system.o: dirs.h item.h ../../pikotools/date/date.h dircontainer.h ../db/db.h
@@ -739,38 +763,39 @@ system.o: ../core/user.h ../core/group.h ../core/dircontainer.h
system.o: ../core/ugcontainer.h log.h textstream.h logmanipulators.h slog.h
system.o: cur.h request.h error.h config.h htmlfilter.h
system.o: ../templates/htmltextstream.h ../../pikotools/space/spacetojson.h
system.o: session.h user.h plugindata.h rebus.h mount.h ../templates/locale.h
system.o: ../notify/notify.h ../notify/notifypool.h ../templates/patterns.h
system.o: ../templates/locale.h ../templates/localefilter.h
system.o: ../../ezc/src/ezc.h ../../ezc/src/generator.h
system.o: ../../ezc/src/pattern.h ../../ezc/src/functions.h
system.o: ../../ezc/src/funinfo.h ../../ezc/src/stringconv.h
system.o: ../notify/notifythread.h ../core/basethread.h
system.o: ../notify/templatesnotify.h ../core/config.h ../core/users.h
system.o: ugcontainer.h lastcontainer.h mounts.h mountparser.h crypt.h run.h
system.o: users.h groups.h group.h loadavg.h image.h threadmanager.h
system.o: timezones.h timezone.h ../templates/templates.h
system.o: ../templates/patterncacher.h ../templates/indexpatterns.h
system.o: ../templates/patterns.h ../templates/changepatterns.h
system.o: ../templates/htmltextstream.h ../core/cur.h ../core/system.h
system.o: ../core/sessionmanager.h ../core/htmlfilter.h
system.o: ../functions/functions.h ../functions/functionbase.h
system.o: ../core/request.h ../core/synchro.h ../functions/functionparser.h
system.o: ../functions/adduser.h ../functions/cat.h ../functions/chmod.h
system.o: ../functions/privchanger.h ../functions/chown.h
system.o: ../functions/ckeditor.h ../functions/cp.h ../functions/default.h
system.o: ../functions/download.h ../functions/emacs.h ../functions/env.h
system.o: ../functions/last.h ../functions/login.h ../functions/logout.h
system.o: ../functions/ln.h ../functions/ls.h ../functions/man.h
system.o: ../functions/meta.h ../functions/mkdir.h ../functions/mv.h
system.o: ../functions/nicedit.h ../functions/node.h ../functions/passwd.h
system.o: ../functions/priv.h ../functions/pw.h ../functions/reload.h
system.o: ../functions/rm.h ../functions/rmuser.h ../functions/sort.h
system.o: ../functions/specialdefault.h ../functions/stat.h
system.o: ../functions/subject.h ../functions/template.h
system.o: session.h user.h plugindata.h rebus.h ipban.h mount.h
system.o: ../templates/locale.h ../notify/notify.h ../notify/notifypool.h
system.o: ../templates/patterns.h ../templates/locale.h
system.o: ../templates/localefilter.h ../../ezc/src/ezc.h
system.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h
system.o: ../../ezc/src/functions.h ../../ezc/src/funinfo.h
system.o: ../../ezc/src/stringconv.h ../notify/notifythread.h
system.o: ../core/basethread.h ../notify/templatesnotify.h ../core/config.h
system.o: ../core/users.h ugcontainer.h lastcontainer.h mounts.h
system.o: mountparser.h crypt.h run.h users.h groups.h group.h loadavg.h
system.o: image.h threadmanager.h timezones.h timezone.h
system.o: ../templates/templates.h ../templates/patterncacher.h
system.o: ../templates/indexpatterns.h ../templates/patterns.h
system.o: ../templates/changepatterns.h ../templates/htmltextstream.h
system.o: ../core/cur.h ../core/system.h ../core/sessionmanager.h
system.o: ../core/htmlfilter.h ../functions/functions.h
system.o: ../functions/functionbase.h ../core/request.h ../core/synchro.h
system.o: ../functions/functionparser.h ../functions/adduser.h
system.o: ../functions/cat.h ../functions/chmod.h ../functions/privchanger.h
system.o: ../functions/chown.h ../functions/ckeditor.h ../functions/cp.h
system.o: ../functions/default.h ../functions/download.h ../functions/emacs.h
system.o: ../functions/env.h ../functions/last.h ../functions/login.h
system.o: ../functions/logout.h ../functions/ln.h ../functions/ls.h
system.o: ../functions/man.h ../functions/meta.h ../functions/mkdir.h
system.o: ../functions/mv.h ../functions/nicedit.h ../functions/node.h
system.o: ../functions/passwd.h ../functions/priv.h ../functions/pw.h
system.o: ../functions/reload.h ../functions/rm.h ../functions/rmuser.h
system.o: ../functions/sort.h ../functions/specialdefault.h
system.o: ../functions/stat.h ../functions/subject.h ../functions/template.h
system.o: ../functions/tinymce.h ../functions/uname.h ../functions/upload.h
system.o: ../functions/uptime.h ../functions/who.h ../functions/vim.h
system.o: plugin.h pluginmsg.h sessionmanager.h sessioncontainer.h
system.o: ipbancontainer.h
threadmanager.o: threadmanager.h basethread.h synchro.h log.h textstream.h
threadmanager.o: logmanipulators.h ../../pikotools/textstream/textstream.h
threadmanager.o: ../../pikotools/space/space.h ../../pikotools/date/date.h
@@ -785,7 +810,7 @@ threadmanager.o: ../../pikotools/textstream/types.h htmlfilter.h
threadmanager.o: ../templates/htmltextstream.h ../core/textstream.h misc.h
threadmanager.o: ../../pikotools/utf8/utf8.h
threadmanager.o: ../../pikotools/space/spacetojson.h session.h user.h
threadmanager.o: plugindata.h rebus.h mount.h ../templates/locale.h
threadmanager.o: plugindata.h rebus.h ipban.h mount.h ../templates/locale.h
timezone.o: timezone.h ../../pikotools/date/date.h
timezone.o: ../../pikotools/space/space.h misc.h item.h requesttypes.h
timezone.o: ../../pikotools/textstream/textstream.h
@@ -806,12 +831,12 @@ timezones.o: ../../pikotools/textstream/types.h ../../pikotools/utf8/utf8.h
timezones.o: log.h textstream.h logmanipulators.h slog.h cur.h request.h
timezones.o: error.h config.h htmlfilter.h ../templates/htmltextstream.h
timezones.o: ../core/textstream.h ../../pikotools/space/spacetojson.h
timezones.o: session.h user.h plugindata.h rebus.h mount.h
timezones.o: session.h user.h plugindata.h rebus.h ipban.h mount.h
timezones.o: ../templates/locale.h
user.o: user.h
users.o: users.h sessionmanager.h sessioncontainer.h session.h item.h
users.o: ../../pikotools/space/space.h ../../pikotools/date/date.h error.h
users.o: user.h plugindata.h rebus.h textstream.h cur.h request.h
users.o: user.h plugindata.h rebus.h textstream.h ipban.h cur.h request.h
users.o: requesttypes.h ../../pikotools/textstream/textstream.h
users.o: ../../pikotools/convert/convert.h ../../pikotools/convert/inttostr.h
users.o: ../../pikotools/membuffer/membuffer.h
@@ -820,13 +845,14 @@ users.o: ../../pikotools/space/spaceparser.h ../../pikotools/space/space.h
users.o: ../../pikotools/textstream/types.h htmlfilter.h
users.o: ../templates/htmltextstream.h ../core/textstream.h misc.h
users.o: ../../pikotools/utf8/utf8.h ../../pikotools/space/spacetojson.h
users.o: mount.h lastcontainer.h system.h job.h basethread.h synchro.h dirs.h
users.o: dircontainer.h ../db/db.h ../db/dbbase.h ../db/dbconn.h
users.o: ../db/dbtextstream.h ../core/error.h ../db/dbitemquery.h
users.o: ../core/item.h ../db/dbitemcolumns.h ../core/user.h ../core/group.h
users.o: ../core/dircontainer.h ../core/ugcontainer.h log.h logmanipulators.h
users.o: slog.h ../templates/locale.h ../notify/notify.h
users.o: ../notify/notifypool.h ../templates/patterns.h ../templates/locale.h
users.o: mount.h ipbancontainer.h lastcontainer.h system.h job.h basethread.h
users.o: synchro.h dirs.h dircontainer.h ../db/db.h ../db/dbbase.h
users.o: ../db/dbconn.h ../db/dbtextstream.h ../core/error.h
users.o: ../db/dbitemquery.h ../core/item.h ../db/dbitemcolumns.h
users.o: ../core/user.h ../core/group.h ../core/dircontainer.h
users.o: ../core/ugcontainer.h log.h logmanipulators.h slog.h
users.o: ../templates/locale.h ../notify/notify.h ../notify/notifypool.h
users.o: ../templates/patterns.h ../templates/locale.h
users.o: ../templates/localefilter.h ../../ezc/src/ezc.h
users.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h
users.o: ../../ezc/src/functions.h ../../ezc/src/funinfo.h
+1 -1
View File
@@ -1 +1 @@
o = acceptbaseparser.o app.o basethread.o bbcodeparser.o compress.o config.o crypt.o dircontainer.o dirs.o groups.o htmlfilter.o httpsimpleparser.o image.o item.o job.o lastcontainer.o loadavg.o log.o misc.o mount.o mountparser.o mounts.o plugin.o plugindata.o postmultiparser.o rebus.o request.o run.o session.o sessioncontainer.o sessionmanager.o sessionparser.o slog.o synchro.o system.o threadmanager.o timezone.o timezones.o user.o users.o
o = acceptbaseparser.o app.o basethread.o bbcodeparser.o compress.o config.o crypt.o dircontainer.o dirs.o groups.o htmlfilter.o httpsimpleparser.o image.o ipbancontainer.o item.o job.o lastcontainer.o loadavg.o lock.o log.o misc.o mount.o mountparser.o mounts.o plugin.o plugindata.o postmultiparser.o rebus.o request.o run.o session.o sessioncontainer.o sessionmanager.o sessionparser.o slog.o synchro.o system.o threadmanager.o timezone.o timezones.o user.o users.o
+70 -69
View File
@@ -15,6 +15,8 @@
#include <cstdio>
#include <fetch.h>
#include <signal.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include "app.h"
#include "plugin.h"
@@ -55,6 +57,7 @@ App::App()
functions.SetSystem(&system);
functions.SetTemplates(&templates);
functions.SetSynchro(&synchro);
functions.SetSessionManager(&session_manager);
system.SetConfig(&config);
system.SetCur(&cur);
@@ -149,6 +152,7 @@ bool App::Init()
// init notify after templates (it uses locales from templates)
system.notify.ReadTemplates();
session_manager.InitBanList();
session_manager.InitTmpSession();
session_manager.LoadSessions();
@@ -220,78 +224,41 @@ return true;
/*
if this method returns true then we make a redirect
*/
bool App::ShouldNotUseSSL()
void App::CheckIfNeedSSLredirect()
{
if( cur.request->method == Request::post )
return false;
if( !config.use_ssl )
return true;
// !! IMPROVE ME add a flag to functions to indicate if the function need SSL
if( cur.request->function == &functions.fun_login ||
cur.request->function == &functions.fun_adduser )
return false;
if( config.use_ssl_only_for_logged_users && !cur.session->puser )
return true;
return false;
}
/*
if this method returns true then we make a redirect
*/
bool App::ShouldUseSSL()
{
if( cur.request->method == Request::post )
return false;
if( !config.use_ssl )
return false;
// !! IMPROVE ME add a flag to functions to indicate if the function need SSL
if( cur.request->function == &functions.fun_login ||
cur.request->function == &functions.fun_adduser )
return true;
if( config.use_ssl_only_for_logged_users && !cur.session->puser )
return false;
return true;
}
bool App::CheckSSLcorrectness()
{
bool status = true;
if( cur.request->using_ssl )
{
if( ShouldNotUseSSL() )
// something comes via POST, don't do the redirect because you lose the date
return;
}
if( config.use_ssl )
{
if( !cur.request->using_ssl )
{
BaseUrlRedirect(config.use_ssl_redirect_code, true);
log << log3 << "App: this operation should NOT be used in SSL connection" << logend;
status = false;
if( !config.use_ssl_only_for_logged_users ||
cur.session->puser ||
(cur.request->function && cur.request->function->need_ssl) )
{
log << log3 << "App: this operation should be used through SSL" << logend;
BaseUrlRedirect(config.use_ssl_redirect_code, true);
}
}
}
else
if( ShouldUseSSL() )
{
BaseUrlRedirect(config.use_ssl_redirect_code, true);
log << log3 << "App: this operation should be used in SSL connection" << logend;
status = false;
if( cur.request->using_ssl )
{
log << log3 << "App: this operation should NOT be used through SSL" << logend;
BaseUrlRedirect(config.use_ssl_redirect_code, true);
}
}
return status;
}
void App::SetLocale()
{
size_t locale_id;
@@ -312,6 +279,23 @@ size_t locale_id;
}
bool App::CheckAccessFromPlugins()
{
PluginRes res = plugin.Call(WINIX_CHECK_PLUGIN_ACCESS);
if( res.res_false > 0 )
{
cur.request->status = WINIX_ERR_PERMISSION_DENIED;
log << log2 << "App: access prevented by a plugin" << logend;
return false;
}
return true;
}
void App::ProcessRequestThrow()
{
ReadRequest();
@@ -333,15 +317,10 @@ void App::ProcessRequestThrow()
plugin.Call(WINIX_SESSION_CHANGED);
functions.Parse(); // parsing directories,files,functions and parameters
cur.mount = system.mounts.CalcCurMount();
if( CheckSSLcorrectness() )
{
cur.mount = system.mounts.CalcCurMount();
if( system.mounts.pmount->type != system.mounts.MountTypeStatic() )
Make();
}
if( cur.mount->type != system.mounts.MountTypeStatic() )
Make();
}
SendAnswer();
@@ -486,6 +465,7 @@ void App::CheckPostRedirect()
// zmienic nazwe np na ProcessRequest
// !! ta nazwa chyba juz zajeta...
// !! IMPROVE ME need some refactoring
void App::Make()
{
if( cur.request->dir_tab.empty() )
@@ -494,6 +474,16 @@ void App::Make()
return;
}
if( cur.session->ip_ban && cur.session->ip_ban->IsIPBanned() )
{
PT::Date date(cur.session->ip_ban->expires);
log << log2 << "App: this IP address is banned until to: " << date << " UTC" << logend;
slog << logerror << T("this_ip_is_banned_until") << ' ' << date << " UTC" << logend;
cur.request->status = WINIX_ERR_PERMISSION_DENIED;
}
// cur.request->status can be changed by function_parser
if( cur.request->status == WINIX_ERR_OK )
plugin.Call(WINIX_PREPARE_REQUEST);
@@ -501,6 +491,15 @@ void App::Make()
if( cur.request->status == WINIX_ERR_OK )
functions.CheckFunctionAndSymlink();
CheckAccessFromPlugins();
// !! CHECK ME CheckFunctionAndSymlink can set redirect_to
// may it should be tested before calling CheckIfNeedSSLredirect?
CheckIfNeedSSLredirect();
if( !cur.request->redirect_to.empty() )
return;
if( cur.request->status == WINIX_ERR_OK )
functions.MakeFunction();
@@ -569,7 +568,7 @@ void App::ReadRequest()
CheckKonqueror();
if( cur.request->using_ssl )
log << log3 << "App: SSL enabled" << logend;
log << log3 << "App: connection secure through SSL" << logend;
if( cur.request->role == Request::authorizer )
log << log3 << "App: fast cgi role: authorizer" << logend;
@@ -604,6 +603,8 @@ void App::ReadEnvVariables()
SetEnv(cur.request->env_content_type, "CONTENT_TYPE");
SetEnv(cur.request->env_http_accept_encoding, "HTTP_ACCEPT_ENCODING");
SetEnv(cur.request->env_https, "HTTPS");
cur.request->ip = (int)inet_addr(cur.request->env_remote_addr);
}
+2 -3
View File
@@ -123,13 +123,12 @@ private:
std::string sendfilea, sendfile2a;
std::string send_data_buf;
bool CheckAccessFromPlugins();
void ProcessRequestThrow();
void ProcessRequest();
void BaseUrlRedirect(int code, bool add_subdomain);
bool BaseUrlRedirect();
bool ShouldUseSSL();
bool ShouldNotUseSSL();
bool CheckSSLcorrectness();
void CheckIfNeedSSLredirect();
void SetLocale();
void CheckPostRedirect();
void MakePage();
+12
View File
@@ -246,6 +246,18 @@ void Config::AssignValues(bool stdout_is_closed)
etc_dir = Text(L"etc_dir", L"");
time_zones_file = Text(L"time_zones_file", L"time_zones.conf");
use_ban_list = Bool(L"use_ban_list", true);
ban_list_soft_max_size = Size(L"ban_list_soft_max_size", 50000);
ban_list_max_size = Size(L"ban_list_max_size", 51000);
ban_level_1_delay = Size(L"ban_level_1_delay", 1800);
ban_level_2_delay = Size(L"ban_level_2_delay", 86400);
ban_level_3_delay = Size(L"ban_level_3_delay", 604800);
incorrect_login_min_time_between_get_post = Size(L"incorrect_login_min_time_between_get_post", 2);
incorrect_login_captcha_treshold = Size(L"incorrect_login_captcha_treshold", 3);
incorrect_login_cannot_login_mode = Int(L"incorrect_login_cannot_login_mode", 0);
incorrect_login_cannot_login_treshold = Size(L"incorrect_login_cannot_login_treshold", 20);
incorrect_login_cannot_login_delay = Size(L"incorrect_login_cannot_login_delay", 1800);
}
+68 -8
View File
@@ -523,6 +523,68 @@ public:
// each time zone is in a seperate space
std::wstring time_zones_file;
// turn on the IP ban mechanizm
// we have got three levels of bans (level 1, level 2, and the highest level 3)
// default: true
bool use_ban_list;
// the so called 'soft' max size
// read below description for explanation
// this is introduced to avoid deleting only one record from the ban list
// default: 50000
size_t ban_list_soft_max_size;
// this is the 'hard' max size of an IP's ban list
// if there are more records than this value
// then some of them will be removed (until the size will be ban_list_soft_max_size equal)
// this value should be a little larger from ban_list_soft_max_size
// default: 51000
size_t ban_list_max_size;
// delay in seconds of the first level ban
// default: 1800 (30 minutes)
// it means withing the next 30 minutes you see only 'you are banned...' message on your webbrowser
size_t ban_level_1_delay;
// delay in seconds of the second level ban
// default: 86400 (24 hours)
size_t ban_level_2_delay;
// delay in seconds of the third level ban
// default: 604800 (7 days)
size_t ban_level_3_delay;
// the minimum time in seconds which has to pass between the first GET request
// (showing your the login form) and the second POST request (which sends the
// login and password to the server)
// if the time is shorter then the login attempt is treated as incorrect
// (the same as if you provide incorrect user/password)
// default: 2
size_t incorrect_login_min_time_between_get_post;
// how many incorrect logins there must have been passed to display a captcha
// next to the login form
// default: 3
size_t incorrect_login_captcha_treshold;
// the way how we prevent to login if there are too many incorrect login attempts
// 0 - 'block logging' - do not show the login form in 'login' winix function
// (instead a warning message will be printed)
// 1 - add to ban list (warning: people from this IP will not be able to see your site and do anything)
// default: 0
int incorrect_login_cannot_login_mode;
// after how many incorrect login attempts we do the incorrect_login_cannot_login_mode action
// default: 20
size_t incorrect_login_cannot_login_treshold;
// used when incorrect_login_cannot_login_mode is zero
// it is the time which should be passed to allow logging
// default: 1800 (30 minutes)
// if incorrect_login_cannot_login_mode is one then ban_level_X_delay times
// will be taken accordingly
size_t incorrect_login_cannot_login_delay;
Config();
@@ -556,20 +618,18 @@ public:
// raw access to the config
PT::Space space;
private:
PT::SpaceParser parser;
std::string default_str;
bool errors_to_stdout;
void ShowError();
void AssignValues(bool stdout_is_closed);
void SetAdditionalVariables();
void CheckPasswd();
PT::SpaceParser parser;
std::string default_str;
int default_int;
bool default_bool;
bool errors_to_stdout;
};
+73 -32
View File
@@ -10,7 +10,6 @@
#include <cstring>
#include "crypt.h"
#include "utf8/utf8.h"
#include "misc.h"
#include "log.h"
@@ -21,22 +20,19 @@ void Crypt::SetConfig(Config * pconfig)
}
void Crypt::TrimLastWhite(std::string & str)
char Crypt::ConvertToHexForm(int val)
{
if( str.empty() )
return;
if( val < 10 )
return val + '0';
size_t i = str.size();
while( i > 0 && (IsWhite(str[i-1]) || str[i-1]==10) )
i -= 1;
if( i < str.size() )
str.erase(i);
return val - 10 + 'a';
}
bool Crypt::Hash(int hash, const char * in, size_t inlen, std::string & out)
bool Crypt::HashBin(int hash, const char * in, size_t inlen, std::string & out)
{
out.clear();
@@ -47,6 +43,7 @@ bool Crypt::Hash(int hash, const char * in, size_t inlen, std::string & out)
PT::WideToUTF8(config->opensll_path, command);
run.Cmd(command);
run.Par("dgst");
run.Par("-binary");
switch(hash)
{
@@ -62,52 +59,96 @@ bool Crypt::Hash(int hash, const char * in, size_t inlen, std::string & out)
return false;
}
bool result = run.Go(in, inlen, out) == 0;
TrimLastWhite(out);
return result;
return run.Go(in, inlen, out) == 0;
}
bool Crypt::Hash(int hash, const char * in, std::string & out)
bool Crypt::HashBin(int hash, const char * in, std::string & out)
{
size_t len = strlen(in);
return Hash(hash, in, len, out);
return HashBin(hash, in, len, out);
}
bool Crypt::Hash(int hash, const std::string & in, std::string & out)
bool Crypt::HashBin(int hash, const std::string & in, std::string & out)
{
return Hash(hash, in.c_str(), in.size(), out);
return HashBin(hash, in.c_str(), in.size(), out);
}
bool Crypt::Hash(int hash, const wchar_t * in, size_t inlen, std::wstring & out)
bool Crypt::HashBin(int hash, const wchar_t * in, size_t inlen, std::string & out)
{
PT::WideToUTF8(in, inlen, bufina);
int res = Hash(hash, bufina.c_str(), bufina.size(), bufouta);
int res = HashBin(hash, bufina.c_str(), bufina.size(), out);
bufina.clear();
// the output hash is not a UTF8 string
// it consists only from ascii letters
AssignString(bufouta, out);
return res;
}
bool Crypt::HashBin(int hash, const wchar_t * in, std::string & out)
{
size_t len = wcslen(in);
return HashBin(hash, in, len, out);
}
bool Crypt::HashBin(int hash, const std::wstring & in, std::string & out)
{
return HashBin(hash, in.c_str(), in.size(), out);
}
bool Crypt::HashHex(int hash, const char * in, size_t inlen, std::string & out)
{
int res = HashBin(hash, in, inlen, out_temp);
ConvertToHexForm(out_temp, out);
out_temp.clear();
return res;
}
bool Crypt::Hash(int hash, const wchar_t * in, std::wstring & out)
bool Crypt::HashHex(int hash, const char * in, std::string & out)
{
size_t len = wcslen(in);
return Hash(hash, in, len, out);
size_t len = strlen(in);
return HashHex(hash, in, len, out);
}
bool Crypt::Hash(int hash, const std::wstring & in, std::wstring & out)
bool Crypt::HashHex(int hash, const std::string & in, std::string & out)
{
return Hash(hash, in.c_str(), in.size(), out);
return HashHex(hash, in.c_str(), in.size(), out);
}
bool Crypt::HashHex(int hash, const wchar_t * in, size_t inlen, std::wstring & out)
{
int res = HashBin(hash, in, inlen, out_temp);
ConvertToHexForm(out_temp, out);
out_temp.clear();
return res;
}
bool Crypt::HashHex(int hash, const wchar_t * in, std::wstring & out)
{
size_t len = wcslen(in);
return HashHex(hash, in, len, out);
}
bool Crypt::HashHex(int hash, const std::wstring & in, std::wstring & out)
{
return HashHex(hash, in.c_str(), in.size(), out);
}
@@ -199,7 +240,7 @@ bool Crypt::PassHash(const std::wstring & salt, UserPass & up)
pass_salted = up.pass;
pass_salted += salt;
if( Hash(up.pass_type, pass_salted, up.pass) )
if( HashHex(up.pass_type, pass_salted, up.pass) )
{
if( !salt.empty() )
up.pass_hash_salted = true;
+68 -15
View File
@@ -2,7 +2,7 @@
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2011, Tomasz Sowa
* Copyright (c) 2011-2012, Tomasz Sowa
* All rights reserved.
*
*/
@@ -50,11 +50,11 @@ public:
in - input buffer
inlen - the length of the buffer
output:
out - the hash
out - the hash in binary form
*/
bool Hash(int hash, const char * in, size_t inlen, std::string & out);
bool Hash(int hash, const char * in, std::string & out);
bool Hash(int hash, const std::string & in, std::string & out);
bool HashBin(int hash, const char * in, size_t inlen, std::string & out);
bool HashBin(int hash, const char * in, std::string & out);
bool HashBin(int hash, const std::string & in, std::string & out);
/*
@@ -66,11 +66,43 @@ public:
in - input buffer
inlen - the length of the buffer
output:
out - the hash
out - the hash in binary form
*/
bool Hash(int hash, const wchar_t * in, size_t inlen, std::wstring & out);
bool Hash(int hash, const wchar_t * in, std::wstring & out);
bool Hash(int hash, const std::wstring & in, std::wstring & out);
bool HashBin(int hash, const wchar_t * in, size_t inlen, std::string & out);
bool HashBin(int hash, const wchar_t * in, std::string & out);
bool HashBin(int hash, const std::wstring & in, std::string & out);
/*
calculating a hash from a given input
input:
hash - the kind of the hash - WINIX_CRYPT_HASH_*
in - input buffer
inlen - the length of the buffer
output:
out - the hash in the hex form (one byte is saved as two hex digits)
*/
bool HashHex(int hash, const char * in, size_t inlen, std::string & out);
bool HashHex(int hash, const char * in, std::string & out);
bool HashHex(int hash, const std::string & in, std::string & out);
/*
calculating a hash from a given input
the input string is first changed to UTF8 and then hash is calculated
input:
hash - the kind of the hash - WINIX_CRYPT_HASH_*
in - input buffer
inlen - the length of the buffer
output:
out - the hash in the hex form (one byte is saved as two hex digits)
the 'out' here is std::wstring (not std::string like beforehand)
*/
bool HashHex(int hash, const wchar_t * in, size_t inlen, std::wstring & out);
bool HashHex(int hash, const wchar_t * in, std::wstring & out);
bool HashHex(int hash, const std::wstring & in, std::wstring & out);
/*
@@ -83,7 +115,7 @@ public:
inlen - the size of the buffer
output:
out - encrypted or decrypted buffer
out - encrypted or decrypted buffer (always binary)
*/
bool RSA(bool encrypt, const char * keypath, const char * in, size_t inlen, std::string & out);
bool RSA(bool encrypt, const char * keypath, const std::string & in, std::string & out);
@@ -179,22 +211,27 @@ public:
private:
void TrimLastWhite(std::string & str);
Config * config;
Run run;
std::string command, bufina, bufouta, keypatha;
std::string command, bufina, keypatha;
//std::wstring pass_salted;//, pass_hashed;
//std::string pass_hasheda, pass_encrypteda;
std::wstring pass_salted, pass_org;
std::string passa;
std::string passa, out_temp;
std::wstring empty;
template<typename StringType>
void ConvertToHexForm(const std::string & in, StringType & out);
char ConvertToHexForm(int val);
};
template<class StringType>
template<typename StringType>
void Crypt::ClearString(StringType & str)
{
for(size_t i=0 ; i<str.size() ; ++i)
@@ -204,6 +241,22 @@ void Crypt::ClearString(StringType & str)
}
template<typename StringType>
void Crypt::ConvertToHexForm(const std::string & in, StringType & out)
{
out.clear();
if( in.size() * 2 > out.capacity() )
out.reserve(in.size() * 2);
for(size_t i=0 ; i<in.size() ; ++i)
{
out += ConvertToHexForm(((unsigned char)in[i]) >> 4);
out += ConvertToHexForm(((unsigned char)in[i]) & 0x0f);
}
}
#endif
+18 -5
View File
@@ -351,7 +351,7 @@ return &(*etc);
}
Item * Dirs::GetDir(const std::wstring & name, long parent)
Item * Dirs::GetDir(const wchar_t * name, long parent)
{
DirContainer::ParentIterator i = dir_tab.FindFirstChild(parent);
@@ -363,10 +363,16 @@ return 0;
}
Item * Dirs::GetDir(const std::wstring & path)
Item * Dirs::GetDir(const std::wstring & name, long parent)
{
if( path.empty() )
return GetDir(name.c_str(), parent);
}
Item * Dirs::GetDir(const wchar_t * path)
{
if( *path == 0 )
return 0;
DirContainer::Iterator root = dir_tab.GetRoot();
@@ -376,7 +382,7 @@ Item * Dirs::GetDir(const std::wstring & path)
return 0;
Item * pitem = &(*root);
const wchar_t * s = path.c_str();
const wchar_t * s = path;
while( ExtractName(s, get_dir_temp) )
{
@@ -390,6 +396,13 @@ return pitem;
}
Item * Dirs::GetDir(const std::wstring & path)
{
return GetDir(path.c_str());
}
Item * Dirs::GetDir(long id)
{
DirContainer::Iterator i = dir_tab.FindId(id);
+3
View File
@@ -67,7 +67,10 @@ public:
Item * GetRootDir();
Item * GetEtcDir();
Item * GetVarDir();
Item * GetDir(const wchar_t * name, long parent);
Item * GetDir(const std::wstring & name, long parent);
Item * GetDir(const wchar_t * path);
Item * GetDir(const std::wstring & path);
Item * GetDir(long id);
Item * AddDir(const Item & item);
+148
View File
@@ -0,0 +1,148 @@
/*
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2012, Tomasz Sowa
* All rights reserved.
*
*/
#ifndef headerfile_winix_core_ipban
#define headerfile_winix_core_ipban
// telling if the IPBan record is active
// we have two records: active and non active
// non active records is something like a history
// it is used to remember the last ban level
// so based on this in the future a next greater ban can be calculated
#define WINIX_IPBAN_FLAG_ACTIVE 1
// current ban level
// (if one of these flag is set and the record is active then it means the IP is banned at the moment)
// level 1: banned for short time
// level 2: can be set after level 1 has expired and the attacker still have not given up
// banned for some longer time in level 1
// level 3: can be set after level 2
// banned for much more time
#define WINIX_IPBAN_FLAG_BAN_LEVEL1 2
#define WINIX_IPBAN_FLAG_BAN_LEVEL2 4
#define WINIX_IPBAN_FLAG_BAN_LEVEL3 8
/*
struct defining some restrictions to an IP address
*/
struct IPBan
{
// at the moment only IPv4 are supported
int ip;
// one or more flags from WINIX_IPBAN_FLAG_*
int flags;
// when this record was last used
time_t last_used;
// when the restrictions (ban) should be removed
// valid only if some of WINIX_IPBAN_FLAG_BAN_LEVELX flags are set
// actually we do not remove the record but unsets WINIX_IPBAN_FLAG_ACTIVE flag
// so in the future we can check whether we need to change
// the ban level to a greater value
time_t expires;
// how many incorrect login attempts there are
unsigned int incorrect_login_events;
// in the future there can be more *_events fields
bool HasFlag(int flag) const
{
return (flags & flag) != 0;
}
void SetFlag(int flag)
{
flags = flags | flag;
}
void ClearFlag(int flag)
{
flags = flags & (~flag);
}
bool IsIPBanned() const
{
if( !HasFlag(WINIX_IPBAN_FLAG_ACTIVE) )
return false;
return HasFlag(WINIX_IPBAN_FLAG_BAN_LEVEL1) ||
HasFlag(WINIX_IPBAN_FLAG_BAN_LEVEL2) ||
HasFlag(WINIX_IPBAN_FLAG_BAN_LEVEL3);
}
void AddNextBanLevel(time_t level1_expires, time_t level2_expires, time_t level3_expires)
{
if( HasFlag(WINIX_IPBAN_FLAG_BAN_LEVEL3) )
{
expires = level3_expires;
return;
}
else
if( HasFlag(WINIX_IPBAN_FLAG_BAN_LEVEL2) )
{
SetFlag(WINIX_IPBAN_FLAG_BAN_LEVEL3);
expires = level3_expires;
return;
}
else
if( HasFlag(WINIX_IPBAN_FLAG_BAN_LEVEL1) )
{
SetFlag(WINIX_IPBAN_FLAG_BAN_LEVEL2);
expires = level2_expires;
return;
}
else
{
SetFlag(WINIX_IPBAN_FLAG_BAN_LEVEL1);
expires = level1_expires;
}
}
IPBan()
{
Clear();
}
void Clear()
{
ip = 0;
flags = 0;
last_used = 0;
expires = 0;
incorrect_login_events = 0;
}
void ClearAfterRemovingBan()
{
ClearFlag(WINIX_IPBAN_FLAG_ACTIVE);
incorrect_login_events = 0;
expires = 0;
}
};
#endif
+208
View File
@@ -0,0 +1,208 @@
/*
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2012, Tomasz Sowa
* All rights reserved.
*
*/
#include <algorithm>
#include "ipbancontainer.h"
#include "log.h"
#include "date/date.h"
IPBanContainer::IPBanContainer()
{
is_ipban_tab_sorted = false;
soft_max_size = 100;
max_size = 110;
}
void IPBanContainer::SetMaxSize(size_t soft_size, size_t size)
{
soft_max_size = soft_size;
max_size = size;
if( max_size < soft_max_size )
max_size = soft_max_size + 1;
ipban_tab.reserve(max_size);
sort_helper_tab.reserve(max_size);
}
// returning a reference to the added (or existed) record
IPBan & IPBanContainer::AddIP(int ip)
{
IPBan * old_ip_ban = FindIP(ip);
if( !old_ip_ban )
{
IPBan ip_ban;
ip_ban.ip = ip;
if( ipban_tab.size() >= max_size )
RemoveOldRecords();
ipban_tab.push_back(ip_ban);
return ipban_tab.back();
}
else
{
return *old_ip_ban;
}
}
// we need to remove some old records for the size of the container
// to be less or equal to soft_max_size
void IPBanContainer::RemoveOldRecords()
{
PrintTab();
size_t to_remove = 0;
if( ipban_tab.size() >= soft_max_size )
to_remove = ipban_tab.size() - soft_max_size;
if( to_remove > 0 )
{
log << log4 << "we are going to remove: " << to_remove << " records" << logend;
sort_helper_tab.resize(ipban_tab.size());
for(size_t i=0 ; i<ipban_tab.size() ; ++i)
sort_helper_tab[i] = i;
std::sort(sort_helper_tab.begin(), sort_helper_tab.end(), SortByLastUsedHelper(this));
PrintTab2();
sort_helper_tab.resize(to_remove);
std::sort(sort_helper_tab.begin(), sort_helper_tab.end());
PrintTab2();
while( to_remove-- > 0 )
{
log << log4 << "removing record index: " << sort_helper_tab[to_remove] << ", last_used: ";
PT::Date date(ipban_tab[sort_helper_tab[to_remove]].last_used);
log << date << logend;
ipban_tab.erase(ipban_tab.begin() + sort_helper_tab[to_remove]);
}
log << log4 << "after removing we have: " << logend;
PrintTab();
}
}
void IPBanContainer::PrintTab()
{
log << log4 << "ipban_tab (size: " << ipban_tab.size() << ")" << logend;
for(size_t i=0 ; i<ipban_tab.size() ; ++i)
{
log << log4 << i << ": ip: " << ipban_tab[i].ip << ", flags: " << ipban_tab[i].flags << ", last_used: ";
PT::Date date(ipban_tab[i].last_used);
log << date << ", expires: ";
date = ipban_tab[i].expires;
log << date << logend;
}
}
void IPBanContainer::PrintTab2()
{
log << log4 << "sort_helper_tab (size: " << sort_helper_tab.size() << ")" << logend;
for(size_t i=0 ; i<sort_helper_tab.size() ; ++i)
{
IPBan & ipban = ipban_tab[sort_helper_tab[i]];
log << log4 << i << ": ip: " << ipban.ip << ", flags: " << ipban.flags << ", last_used: ";
PT::Date date(ipban.last_used);
log << date << ", expires: ";
date = ipban.expires;
log << date << logend;
}
}
bool IPBanContainer::SortByLastUsedHelper::operator()(size_t index1, size_t index2)
{
if( index1 < container->ipban_tab.size() &&
index2 < container->ipban_tab.size() )
{
IPBan & ip1 = container->ipban_tab[index1];
IPBan & ip2 = container->ipban_tab[index2];
// prefer to select records which do not have WINIX_IPBAN_FLAG_ACTIVE
if( ip1.HasFlag(WINIX_IPBAN_FLAG_ACTIVE) !=
ip2.HasFlag(WINIX_IPBAN_FLAG_ACTIVE) )
{
return ip2.HasFlag(WINIX_IPBAN_FLAG_ACTIVE);
}
return ip1.last_used < ip2.last_used;
}
return false;
}
IPBan * IPBanContainer::FindIP(int ip)
{
// !! IMPROVE ME add binary search if is_ipban_tab_sorted is true
for(size_t i=0 ; i<ipban_tab.size() ; ++i)
{
if( ipban_tab[i].ip == ip )
{
return &ipban_tab[i];
}
}
return 0;
}
IPBan & IPBanContainer::GetIPBan(size_t index)
{
return ipban_tab[index];
}
void IPBanContainer::Sort()
{
std::sort(ipban_tab.begin(), ipban_tab.end(), SortIPBansFunction);
is_ipban_tab_sorted = true;
}
size_t IPBanContainer::Size()
{
return ipban_tab.size();
}
bool IPBanContainer::SortIPBansFunction(const IPBan & ip1, const IPBan & ip2)
{
return ip1.ip < ip2.ip;
}
+56
View File
@@ -0,0 +1,56 @@
/*
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2012, Tomasz Sowa
* All rights reserved.
*
*/
#ifndef headerfile_winix_core_ipbancontainer
#define headerfile_winix_core_ipbancontainer
#include <vector>
#include "ipban.h"
class IPBanContainer
{
public:
IPBanContainer();
IPBan & AddIP(int ip);
IPBan * FindIP(int ip);
void Sort();
size_t Size();
IPBan & GetIPBan(size_t index);
void SetMaxSize(size_t soft_size, size_t size);
private:
std::vector<IPBan> ipban_tab;
bool is_ipban_tab_sorted;
size_t soft_max_size, max_size;
std::vector<size_t> sort_helper_tab;
static bool SortIPBansFunction(const IPBan & ip1, const IPBan & ip2);
void RemoveOldRecords();
void PrintTab();
void PrintTab2();
struct SortByLastUsedHelper
{
IPBanContainer * container;
SortByLastUsedHelper(IPBanContainer * c) : container(c) {}
bool operator()(size_t index1, size_t index2);
};
};
#endif
Executable
+49
View File
@@ -0,0 +1,49 @@
/*
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2012, Tomasz Sowa
* All rights reserved.
*
*/
#include "lock.h"
Lock::Lock()
{
synchro = 0;
}
Lock::Lock(Synchro * synchro_)
{
synchro = synchro_;
synchro->Lock();
}
Lock::Lock(Synchro & synchro_)
{
synchro = &synchro_;
synchro->Lock();
}
Lock::~Lock()
{
Unlock();
}
void Lock::Unlock()
{
if( synchro )
{
synchro->Unlock();
synchro = 0;
}
}
Executable
+37
View File
@@ -0,0 +1,37 @@
/*
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2012, Tomasz Sowa
* All rights reserved.
*
*/
#ifndef headerfile_winix_core_lock
#define headerfile_winix_core_lock
#include "synchro.h"
class Lock
{
public:
Lock(Synchro * synchro_);
Lock(Synchro & synchro_);
~Lock();
void Unlock();
private:
Synchro * synchro;
Lock();
};
#endif
+2 -10
View File
@@ -142,16 +142,8 @@ size_t min_size = value.size() < max_size ? value.size() : max_size;
template<typename char_type, size_t stack_size, size_t heap_block_size>
Log & Log::operator<<(const PT::TextStreamBase<char_type, stack_size, heap_block_size> & buf)
{
if( current_level > log_level )
return *this;
typename PT::TextStreamBase<char_type, stack_size, heap_block_size>::const_iterator i = buf.begin();
// in the future we change buffer to PT::TextStreamBuffer
// so then there'll be << operator
for( ; i != buf.end() ; ++i)
buffer << *i;
if( current_level <= log_level )
buffer << buf;
return *this;
}
+57
View File
@@ -526,6 +526,29 @@ return buffer;
PT::WTextStream IPToStr(unsigned int ip)
{
PT::WTextStream buf;
for(int i=0 ; i<4 ; ++i, ip >>= 8)
{
buf << (ip & 0xff);
if( i<3 )
buf << '.';
}
return buf;
}
PT::WTextStream IPToStr(int ip)
{
return IPToStr(static_cast<unsigned int>(ip));
}
/*
we do not treat a new line character (10) as a white character
*/
@@ -561,6 +584,40 @@ return false;
/*
return true if the whole string has only white characters
an empty string is treated as white
*/
bool IsWhite(const wchar_t * str, bool treat_new_line_as_white)
{
for( ; *str != 0 ; ++str )
{
if( *str == '\n' )
{
if( !treat_new_line_as_white )
return false;
}
else
if( !IsWhite(*str) )
return false;
}
return true;
}
/*
return true if the whole string has only white characters
*/
bool IsWhite(const std::wstring & str, bool treat_new_line_as_white)
{
return IsWhite(str.c_str(), treat_new_line_as_white);
}
bool IsLastSlash(const std::wstring & path)
{
+10
View File
@@ -224,9 +224,19 @@ const char * DateToStrCookie(int year, int month, int day, int hour, int min, in
const char * DateToStrCookie(const PT::Date & d);
const char * DateToStrCookie(time_t t);
// depracated
// not thread safe
const wchar_t * IpToStr(unsigned int ip_);
// in a new code we can use WTextStream in such a way
// DateToStr() etc can use it too
PT::WTextStream IPToStr(unsigned int ip);
PT::WTextStream IPToStr(int ip);
bool IsWhite(wchar_t s);
bool IsWhite(const wchar_t * str, bool treat_new_line_as_white = false);
bool IsWhite(const std::wstring & str, bool treat_new_line_as_white = false);
bool IsLastSlash(const std::wstring & path);
template<class StringType>
+6 -1
View File
@@ -246,11 +246,16 @@
//
#define WINIX_POST_PARAMS 31040
// this is the raw string sent in POST method
// in p1 there is a pointer to std::string object
#define WINIX_RAW_POST_STRING 31050
// this message is sent before calling MakePost() or MakeGet()
// if you return false (which is default) you can prevent the access
// to the resource
#define WINIX_CHECK_PLUGIN_ACCESS 31060
/*
messages sent from other threads
+2
View File
@@ -127,6 +127,8 @@ void Request::Clear()
gen_trim_white = false;
gen_skip_new_line = false;
gen_use_special_chars = false;
ip = 0;
}
+4
View File
@@ -89,6 +89,10 @@ struct Request
const char * env_content_type;
const char * env_https;
// current IP address of the remote host (read from REMOTE_ADDR environment variable)
// (at the moment only IPv4 are supported)
int ip;
// true if the browser is Microsoft Internet Explorer
bool browser_msie;
+1
View File
@@ -78,6 +78,7 @@ void Session::Clear(bool clear_plugin_data)
log_buffer.Clear();
last_css.clear();
ip_ban = 0;
if( clear_plugin_data )
plugin_data.Resize(0);
+9 -1
View File
@@ -20,6 +20,7 @@
#include "rebus.h"
#include "textstream.h"
#include "date/date.h"
#include "ipban.h"
@@ -50,7 +51,7 @@ struct Session
PT::Date last_date;
// when there was a last get request
// (used to calculate spam)
// (used to calculate spam or invalid login attempts etc.)
time_t last_time_get;
@@ -78,10 +79,17 @@ struct Session
// buffer for the session log
TextStream<std::wstring> log_buffer;
// !! IMPROVE ME it is still needed?
// css cannot be taken directly from the mountpoint?
// table with css files
// used by some javascript wysiwyg editors (ckeditor, tinymce)
std::vector<std::wstring> last_css;
// pointer to IPBan struct if exists for this IP
// many sessions can pointer to the same IPBan struct
// (it can be null)
IPBan * ip_ban;
};
+55 -4
View File
@@ -57,6 +57,11 @@ void SessionManager::SetLastContainer(LastContainer * plast_container)
}
void SessionManager::InitBanList()
{
ban_tab.SetMaxSize(config->ban_list_soft_max_size, config->ban_list_max_size);
}
size_t SessionManager::Size()
{
@@ -136,15 +141,20 @@ SessionContainer::Iterator i = session_tab.End();
{
// there is a problem with generating a new session id
// we do not set a session cookie
session = &temporary_session;
session->Clear(false);
session->SetTimesTo(cur->request->start_time);
session->new_session = false; // temporary session was initialized at the beginning
log << log1 << "SM: cannot create a session id (temporary used: with id 0)" << logend;
SetTemporarySession();
}
}
void SessionManager::SetTemporarySession()
{
session = &temporary_session;
session->Clear(false);
session->SetTimesTo(cur->request->start_time);
session->new_session = false; // temporary session was initialized at the beginning
}
bool SessionManager::SetSessionFromCookie(const std::string & cookie)
@@ -178,6 +188,24 @@ return true;
void SessionManager::SetSession()
{
current_ip_ban = ban_tab.FindIP(cur->request->ip);
if( current_ip_ban && current_ip_ban->IsIPBanned() )
{
if( current_ip_ban->expires != 0 && cur->request->start_time >= current_ip_ban->expires )
{
log << log2 << "SM: removing a ban from this IP and resetting events counter" << logend;
current_ip_ban->ClearAfterRemovingBan();
}
else
{
log << log2 << "SM: this ip is bannned, using a temporary session" << logend;
SetTemporarySession();
session->ip_ban = current_ip_ban;
return;
}
}
CookieTab::iterator i = cur->request->cookie_tab.find(config->http_session_id_name);
if( i == cur->request->cookie_tab.end() )
@@ -196,9 +224,12 @@ void SessionManager::SetSession()
CreateSession();
}
}
session->ip_ban = current_ip_ban;
}
Session * SessionManager::FindSession(long id)
{
SessionContainer::Iterator i = session_tab.FindById(id);
@@ -411,6 +442,26 @@ return how_many;
}
IPBan & SessionManager::AddIPToBanList(int ip)
{
return ban_tab.AddIP(ip);
}
size_t SessionManager::BanListSize()
{
return ban_tab.Size();
}
IPBan & SessionManager::GetIPBan(size_t index)
{
return ban_tab.GetIPBan(index);
}
/*
+12 -1
View File
@@ -14,6 +14,7 @@
#include <ctime>
#include "sessioncontainer.h"
#include "ipbancontainer.h"
#include "config.h"
#include "request.h"
#include "lastcontainer.h"
@@ -34,6 +35,7 @@ public:
void SetSystem(System * psystem);
void SetLastContainer(LastContainer * plast_container);
// can return a null pointer
Session * FindSession(long id);
@@ -41,6 +43,7 @@ public:
void DeleteSessions(); // deleting all sessions
bool ChangeSessionId(long old_id);
void InitBanList();
void InitTmpSession();
void UninitTmpSession();
@@ -56,6 +59,11 @@ public:
size_t Size();
size_t MarkAllSessionsToRemove(long user_id);
IPBan & AddIPToBanList(int ip);
size_t BanListSize();
IPBan & GetIPBan(size_t index);
private:
Config * config;
@@ -68,6 +76,9 @@ private:
Session * session;
SessionContainer session_tab;
IPBanContainer ban_tab;
IPBan * current_ip_ban;
// session with id 0
Session temporary_session;
@@ -77,7 +88,7 @@ private:
long CreateSessionId();
void CreateSession();
bool SetSessionFromCookie(const std::string & cookie);
void SetTemporarySession();
// second thread
int deleted;
+8 -1
View File
@@ -2,7 +2,7 @@
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2011, Tomasz Sowa
* Copyright (c) 2011-2012, Tomasz Sowa
* All rights reserved.
*
*/
@@ -114,6 +114,13 @@ SLog & SLog::operator<<(double s)
}
SLog & SLog::operator<<(const PT::Date & date)
{
return PutLog(date);
}
SLog & SLog::operator<<(LogManipulators m)
{
if( cur && cur->session )
+16 -3
View File
@@ -2,7 +2,7 @@
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2011, Tomasz Sowa
* Copyright (c) 2011-2012, Tomasz Sowa
* All rights reserved.
*
*/
@@ -13,6 +13,7 @@
#include "cur.h"
#include "logmanipulators.h"
#include "templates/locale.h"
#include "textstream/textstream.h"
#define WINIX_SLOG_MAX_LOG_SIZE 10240
@@ -68,6 +69,11 @@ public:
SLog & operator<<(size_t s);
SLog & operator<<(double s);
SLog & operator<<(LogManipulators m);
SLog & operator<<(const PT::Date & date);
template<typename char_type, size_t stack_size, size_t heap_block_size>
SLog & operator<<(const PT::TextStreamBase<char_type, stack_size, heap_block_size> & buf);
SLog & TranslateText(const char * str);
SLog & TranslateText(const wchar_t * str);
@@ -95,7 +101,7 @@ public:
private:
template<class LogParam>
SLog & PutLog(LogParam par);
SLog & PutLog(const LogParam & par);
Cur * cur;
Locale * locale;
@@ -111,8 +117,15 @@ SLog::TranslateTextHelper<RawType> T(const RawType & par)
}
template<typename char_type, size_t stack_size, size_t heap_block_size>
SLog & SLog::operator<<(const PT::TextStreamBase<char_type, stack_size, heap_block_size> & buf)
{
return PutLog(buf);
}
template<class LogParam>
SLog & SLog::PutLog(LogParam par)
SLog & SLog::PutLog(const LogParam & par)
{
if( cur && cur->session )
cur->session->log_buffer << par;
+1 -2
View File
@@ -132,8 +132,7 @@ bool ssl = false;
{
if( !config->use_ssl_only_for_logged_users ||
cur->session->puser ||
cur->request->function == &functions->fun_login ||
cur->request->function == &functions->fun_adduser)
(cur->request->function && cur->request->function->need_ssl) )
{
str += config->url_ssl_proto;
ssl = true;
+17
View File
@@ -15,6 +15,7 @@
#include "misc.h"
#include "space/space.h"
#include "date/date.h"
#include "textstream/textstream.h"
@@ -62,6 +63,9 @@ public:
TextStream & operator<<(const PT::Space & space);
TextStream & operator<<(const PT::Date & date);
template<typename arg_char_type, size_t arg_stack_size, size_t arg_heap_block_size>
TextStream & operator<<(const PT::TextStreamBase<arg_char_type, arg_stack_size, arg_heap_block_size> & arg);
TextStream & Write(const char * buf, size_t len);
TextStream & Write(const wchar_t * buf, size_t len);
TextStream & write(const char * buf, size_t len); // for compatibility with standard library (Ezc uses it)
@@ -327,6 +331,19 @@ return *this;
}
template<class StringType>
template<typename arg_char_type, size_t arg_stack_size, size_t arg_heap_block_size>
TextStream<StringType> & TextStream<StringType>::operator<<(
const PT::TextStreamBase<arg_char_type, arg_stack_size, arg_heap_block_size> & arg)
{
typename PT::TextStreamBase<arg_char_type, arg_stack_size, arg_heap_block_size>::const_iterator i;
for(i=arg.begin() ; i != arg.end() ; ++i)
buffer += static_cast<char_type>(*i);
return *this;
}
#endif
+1 -1
View File
@@ -13,7 +13,7 @@
#define WINIX_VER_MAJOR 0
#define WINIX_VER_MINOR 5
#define WINIX_VER_REVISION 0
#define WINIX_VER_REVISION 1
#endif
+2 -1
View File
@@ -15,7 +15,8 @@ db.o: ../core/logmanipulators.h ../core/slog.h ../core/cur.h
db.o: ../core/request.h ../core/error.h ../core/config.h ../core/htmlfilter.h
db.o: ../templates/htmltextstream.h ../../pikotools/space/spacetojson.h
db.o: ../core/session.h ../core/user.h ../core/plugindata.h ../core/rebus.h
db.o: ../core/mount.h ../templates/locale.h ../core/log.h ../core/misc.h
db.o: ../core/ipban.h ../core/mount.h ../templates/locale.h ../core/log.h
db.o: ../core/misc.h
dbbase.o: dbbase.h dbconn.h dbtextstream.h ../core/textstream.h
dbbase.o: ../core/misc.h ../core/item.h ../../pikotools/space/space.h
dbbase.o: ../../pikotools/textstream/types.h ../../pikotools/date/date.h
+38 -1
View File
@@ -12,6 +12,7 @@
#include <ctime>
#include "core/textstream.h"
#include "textstream/textstream.h"
@@ -115,6 +116,8 @@ public:
DbTextStream & operator<<(RawText<void*> raw);
DbTextStream & operator<<(RawText<PT::Date> date);
template<typename arg_char_type, size_t arg_stack_size, size_t arg_heap_block_size>
DbTextStream & operator<<(RawText<PT::TextStreamBase<arg_char_type, arg_stack_size, arg_heap_block_size> > raw);
/*
with escaping
@@ -154,6 +157,8 @@ public:
DbTextStream & operator<<(const PT::Space & space);
DbTextStream & operator<<(const PT::Date & date);
template<typename arg_char_type, size_t arg_stack_size, size_t arg_heap_block_size>
DbTextStream & operator<<(const PT::TextStreamBase<arg_char_type, arg_stack_size, arg_heap_block_size> & arg);
private:
@@ -167,6 +172,38 @@ private:
template<typename arg_char_type, size_t arg_stack_size, size_t arg_heap_block_size>
DbTextStream & DbTextStream::operator<<(RawText<PT::TextStreamBase<arg_char_type, arg_stack_size, arg_heap_block_size> > raw)
{
TextStream<std::string>::operator<<(raw.par);
return *this;
}
template<typename arg_char_type, size_t arg_stack_size, size_t arg_heap_block_size>
DbTextStream & DbTextStream::operator<<(const PT::TextStreamBase<arg_char_type, arg_stack_size, arg_heap_block_size> & arg)
{
typename PT::TextStreamBase<arg_char_type, arg_stack_size, arg_heap_block_size>::const_iterator i;
if( was_param )
buffer += ", ";
if( ext_escape )
buffer += 'E';
buffer += '\'';
for(i=arg.begin() ; i != arg.end() ; ++i)
ETextPutChar(*i);
buffer += '\'';
was_param = true;
return *this;
}
#endif
+470 -417
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1 +1 @@
o = adduser.o cat.o chmod.o chown.o ckeditor.o cp.o default.o download.o emacs.o env.o functionbase.o functionparser.o functions.o last.o ln.o locale.o login.o logout.o ls.o man.o meta.o mkdir.o mount.o mv.o nicedit.o node.o passwd.o priv.o privchanger.o pw.o reload.o rm.o rmuser.o run.o sort.o specialdefault.o stat.o subject.o template.o timezone.o tinymce.o uname.o upload.o uptime.o vim.o who.o
o = adduser.o cat.o chmod.o chown.o ckeditor.o cp.o default.o download.o emacs.o env.o functionbase.o functionparser.o functions.o ipban.o last.o ln.o locale.o login.o logout.o ls.o man.o meta.o mkdir.o mount.o mv.o nicedit.o node.o passwd.o priv.o privchanger.o pw.o reload.o rm.o rmuser.o run.o sort.o specialdefault.o stat.o subject.o template.o timezone.o tinymce.o uname.o upload.o uptime.o vim.o who.o
+2 -1
View File
@@ -21,7 +21,8 @@ namespace Fun
AddUser::AddUser()
{
fun.url = L"adduser";
fun.url = L"adduser";
need_ssl = true;
}
+7
View File
@@ -16,6 +16,7 @@ FunctionBase::FunctionBase()
{
follow_symlinks = true;
template_index = size_t(-1);
need_ssl = false;
fun.user_id = -1;
fun.group_id = -1;
@@ -70,6 +71,12 @@ void FunctionBase::SetSynchro(Synchro * psynchro)
}
void FunctionBase::SetSessionManager(SessionManager * pmanager)
{
session_manager = pmanager;
}
void FunctionBase::Init()
{
// this method is called only once at the beginning
+10 -1
View File
@@ -43,6 +43,14 @@ public:
// html template index (for using with 'patterns' object)
size_t template_index;
// try to use SSL
// if in the config 'use_ssl' is true and 'use_ssl_only_for_logged_users' is true
// then ssl is used only for logged users but sometimes there is a need to use
// SSL even if noone is logged (for example for such functions like 'login' or 'adduser')
// default: false
// (this option is ignored if 'use_ssl' in the config is false)
bool need_ssl;
virtual void Init();
virtual bool HasAccess();
virtual void MakePost();
@@ -55,6 +63,7 @@ public:
void SetFunctions(Functions * pfunctions);
void SetTemplates(Templates * ptemplates);
void SetSynchro(Synchro * psynchro);
void SetSessionManager(SessionManager * pmanager);
protected:
@@ -65,7 +74,7 @@ protected:
Functions * functions;
Templates * templates;
Synchro * synchro;
SessionManager * session_manager;
};
+7
View File
@@ -52,6 +52,11 @@ void Functions::SetSynchro(Synchro * psynchro)
}
void Functions::SetSessionManager(SessionManager * pmanager)
{
session_manager = pmanager;
}
size_t Functions::FunctionsSize()
@@ -143,6 +148,7 @@ void Functions::SetObjects(FunctionBase * fun)
fun->SetFunctions(this);
fun->SetTemplates(templates);
fun->SetSynchro(synchro);
fun->SetSessionManager(session_manager);
}
@@ -192,6 +198,7 @@ void Functions::CreateFunctions()
Add(fun_logout);
Add(fun_ln);
Add(fun_ls);
Add(fun_ipban);
Add(fun_man);
Add(fun_meta);
Add(fun_mkdir);
+4
View File
@@ -29,6 +29,7 @@
#include "logout.h"
#include "ln.h"
#include "ls.h"
#include "ipban.h"
#include "man.h"
#include "meta.h"
#include "mkdir.h"
@@ -82,6 +83,7 @@ public:
Fun::Logout fun_logout;
Fun::Ln fun_ln;
Fun::Ls fun_ls;
Fun::IPBanFun fun_ipban;
Fun::Man fun_man;
Fun::Meta fun_meta;
Fun::Mkdir fun_mkdir;
@@ -129,6 +131,7 @@ public:
void SetSystem(System * psystem);
void SetTemplates(Templates * ptemplates);
void SetSynchro(Synchro * psynchro);
void SetSessionManager(SessionManager * pmanager);
FunctionBase * Find(const std::wstring & function_name);
Error CheckSpecialFile(const Item & item);
@@ -163,6 +166,7 @@ private:
System * system;
Synchro * synchro;
Templates * templates;
SessionManager * session_manager;
std::wstring temp;
HTMLFilter html_filter;
+43
View File
@@ -0,0 +1,43 @@
/*
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2012, Tomasz Sowa
* All rights reserved.
*
*/
#include "ipban.h"
#include "functions.h"
namespace Fun
{
IPBanFun::IPBanFun()
{
fun.url = L"ipban";
}
bool IPBanFun::HasAccess()
{
return cur->session->puser && cur->session->puser->super_user;
}
void IPBanFun::MakePost()
{
}
void IPBanFun::MakeGet()
{
}
} // namespace
+36
View File
@@ -0,0 +1,36 @@
/*
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2012, Tomasz Sowa
* All rights reserved.
*
*/
#ifndef headerfile_winix_functions_ipban
#define headerfile_winix_functions_ipban
#include "functionbase.h"
namespace Fun
{
// IPBanFun in order to not confused with IPBan from core winix
class IPBanFun : public FunctionBase
{
public:
IPBanFun();
bool HasAccess();
void MakePost();
void MakeGet();
};
} // namespace
#endif
+149 -6
View File
@@ -6,7 +6,8 @@
* All rights reserved.
*
*/
#include "core/sessionmanager.h"
#include "login.h"
#include "utf8/utf8.h"
@@ -17,7 +18,8 @@ namespace Fun
Login::Login()
{
fun.url = L"login";
fun.url = L"login";
need_ssl = true;
}
@@ -63,7 +65,12 @@ bool Login::CheckPasswords(const std::wstring & password)
return false;
}
return up.pass == up2.pass;
bool result = (up.pass == up2.pass);
if( !result )
log << log2 << "Login: incorrect login/password" << logend;
return result;
}
@@ -84,7 +91,7 @@ bool result;
}
else
{
log << log1 << "Login: there is no a user: " << login << " in the database (or an error)" << logend;
log << log2 << "Login: there is no a user name: " << login << logend;
result = false;
}
@@ -94,24 +101,157 @@ return result;
}
void Login::AddBanInfo()
{
IPBan * ip_ban = cur->session->ip_ban;
if( !ip_ban )
ip_ban = &session_manager->AddIPToBanList(cur->request->ip);
ip_ban->last_used = cur->request->start_time;
if( ip_ban->expires != 0 && cur->request->start_time >= ip_ban->expires )
{
// the 'ip block' has expired
ip_ban->ClearAfterRemovingBan();
log << log3 << "Login: removing the IP block for logging" << logend;
}
if( ip_ban->incorrect_login_events < config->incorrect_login_cannot_login_treshold )
ip_ban->incorrect_login_events += 1;
if( ip_ban->incorrect_login_events >= config->incorrect_login_cannot_login_treshold )
{
log << log2 << "Login: too many incorrect login attempts from this IP" << logend;
if( config->incorrect_login_cannot_login_mode == 0 )
{
// don't set WINIX_IPBAN_FLAG_ACTIVE here for IPBan::IsIPBanned() to return false (in CannotLoginFrom)
ip_ban->expires = cur->request->start_time + (time_t)config->incorrect_login_cannot_login_delay;
PT::Date date(ip_ban->expires);
log << log2 << "Login: logging from this IP address has been blocked until to: " << date << " UTC" << logend;
}
else
if( config->incorrect_login_cannot_login_mode == 1 )
{
ip_ban->SetFlag(WINIX_IPBAN_FLAG_ACTIVE);
ip_ban->AddNextBanLevel(cur->request->start_time + (time_t)config->ban_level_1_delay,
cur->request->start_time + (time_t)config->ban_level_2_delay,
cur->request->start_time + (time_t)config->ban_level_3_delay);
PT::Date date(ip_ban->expires);
log << log2 << "Login: this IP address has been banned until to: " << date << " UTC" << logend;
}
}
}
bool Login::ShouldUseCaptchaForCurrentIP()
{
if( cur->session->ip_ban )
return ShouldUseCaptchaFor(*cur->session->ip_ban);
return false;
}
bool Login::ShouldUseCaptchaFor(const IPBan & ipban)
{
if( ipban.expires != 0 && cur->request->start_time >= ipban.expires )
return false; // the 'ip block' has expired (but incorrect_login_events has the old value)
return ipban.incorrect_login_events >= config->incorrect_login_captcha_treshold;
}
bool Login::CannotLoginFromCurrentIP()
{
if( cur->session->ip_ban )
return CannotLoginFrom(*cur->session->ip_ban);
return false;
}
bool Login::CannotLoginFrom(const IPBan & ipban)
{
if( ipban.IsIPBanned() )
return true;
if( ipban.expires != 0 &&
cur->request->start_time < ipban.expires &&
ipban.incorrect_login_events >= config->incorrect_login_cannot_login_treshold )
return true;
return false;
}
bool Login::CheckAbuse()
{
time_t diff = (time_t)config->incorrect_login_min_time_between_get_post;
if( cur->session->last_time_get + diff > cur->request->start_time )
{
log << log2 << "Login: the minimum time between GET and POST have not passed" << logend;
return false;
}
if( ShouldUseCaptchaForCurrentIP() )
{
if( !system->rebus.CheckRebus() )
{
return false;
}
}
return true;
}
bool Login::LoginUser(const std::wstring & login, const std::wstring & password, bool remember_me, bool use_ses_log)
{
long user_id;
if( cur->session->id == 0 )
{
log << log1 << "Login: can't login in a temporary session (skipped)" << logend;
log << log2 << "Login: can't login in a temporary session (skipped)" << logend;
return false;
}
if( CannotLoginFromCurrentIP() )
{
log << log2 << "Login: you cannot login from this IP address" << logend;
return false;
}
if( login.empty() )
{
log << log3 << "Login: login is empty (skipping)" << logend;
return false;
}
if( !CheckAbuse() )
{
AddBanInfo();
return false;
}
if( CheckUserPass(login, password, user_id) )
{
if( system->users.LoginUser(user_id, remember_me, use_ses_log) )
{
if( cur->session->ip_ban )
cur->session->ip_ban->incorrect_login_events = 0;
return true;
}
}
else
{
log << log2 << "Login: incorrect login/password" << logend;
AddBanInfo();
}
return false;
@@ -129,6 +269,9 @@ void Login::MakePost()
}
void Login::MakeGet()
{
}
} // namespace
+13 -1
View File
@@ -2,7 +2,7 @@
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2010-2011, Tomasz Sowa
* Copyright (c) 2010-2012, Tomasz Sowa
* All rights reserved.
*
*/
@@ -24,14 +24,26 @@ class Login : public FunctionBase
public:
Login();
void MakePost();
void MakeGet();
bool ShouldUseCaptchaForCurrentIP();
bool ShouldUseCaptchaFor(const IPBan & ipban);
bool CannotLoginFromCurrentIP();
bool CannotLoginFrom(const IPBan & ipban);
bool CheckUserPass(const std::wstring & login, const std::wstring & password, long & user_id);
bool LoginUser(const std::wstring & login, const std::wstring & password, bool remember_me, bool use_ses_log = false);
private:
void ClearTmpStruct();
bool CheckPasswords(const std::wstring & password);
void AddBanInfo();
bool CheckAbuse();
UserPass up, up2;
std::string pass_decrypted;
+1 -1
View File
@@ -1,4 +1,4 @@
<p class="iteminfo">
<p class="winix_iteminfo">
{added_by}: [dir_last_user], [dir_last_date_creation_nice]
[if-no dir_last_dates_equal]
+4
View File
@@ -1,3 +1,7 @@
<div class="winix">
<h1>{error_404}</h1>
<p>{error_404_msg}</p>
</div>
+3
View File
@@ -1,5 +1,8 @@
<div class="winix">
<h1>{access_denied}</h1>
<p>{access_denied_msg}</p>
</div>
-10
View File
@@ -1,10 +0,0 @@
[if-no winix_err_is "0"]
<p class="error">
[if-one winix_is_err_in_locales]
[winix_err_msg_from_locales]
[else]
{winix_err_default} [winix_err_code]
[end]
</p>
[end]
+3
View File
@@ -1,3 +1,5 @@
<div class="winix">
<h1>[if-one user_logged]{adduser_header_add}[else]{adduser_header_register}[end]</h1>
<form id="additem" method="post" action="[doc_base_url][dir]adduser">
@@ -35,4 +37,5 @@
</fieldset>
</form>
</div>
+38 -26
View File
@@ -1,34 +1,43 @@
<div class="winix">
[if item_is]<h1>{edit}</h1>[else]<h1>{add}</h1>[end]
[include "error.html"]
<form id="additem" method="post" action="[doc_base_url][dir][if item_is][item_url]/[end]ckeditor">
<fieldset>
<legend>{form_emacs_legend}</legend>
[if mount_type_is "cms"]
<p class="withnext" style="text-indent: 0;">{title}:</p>
<input class="edit" type="text" name="subject" value="[item_subject]">
<p class="withnext" style="text-indent: 0;">{suggested_url}:</p>
<input class="edit" type="text" name="url" value="[item_url]">
<div class="winix_input_a">
<label for="winix_title_id">{title}:</label>
<input id="winix_title_id" type="text" name="subject" value="[item_subject]">
</div>
<div class="winix_input_a">
<label for="winix_url_id">{suggested_url}:</label>
<input id="winix_url_id" type="text" name="url" value="[item_url]">
</div>
[end]
[if-any mount_type_is "thread" mount_thread_arg_is "subject"]
<p class="withnext" style="text-indent: 0;">{title}:</p>
<input class="edit" type="text" name="subject" value="[item_subject]">
[if-any mount_type_is "thread" thread_mount_arg_is "subject"]
<div class="winix_input_a">
<label for="winix_title_id">{title}:</label>
<input id="winix_title_id" type="text" name="subject" value="[item_subject]">
</div>
<p class="withnext" style="text-indent: 0;">{suggested_url}:</p>
<input class="edit" type="text" name="url" value="[item_url]">
<div class="winix_input_a">
<label for="winix_url_id">{suggested_url}:</label>
<input id="winix_url_id" type="text" name="url" value="[item_url]">
</div>
[end]
[if mount_type_is "cms"]<p class="withnext">{form_emacs_content_cms}</p>[end]
[if mount_type_is "thread"]<p class="withnext">{form_emacs_content_thread}</p>[end]
[if mount_type_is "ticket"]<p class="withnext">{form_emacs_content_ticket}</p>[end]
<div class="winix_input_a">
[if mount_type_is "cms"]<label for="winix_content_id">{form_emacs_content_cms}</label>[end]
[if mount_type_is "thread"]<label for="winix_content_id">{form_emacs_content_thread}</label>[end]
[if mount_type_is "ticket"]<label for="winix_content_id">{form_emacs_content_ticket}</label>[end]
[# template fun_ls.html uses the name: itemcontent to refer to this textarea item]
<textarea class="multitext" rows="[if mount_type_is "cms"]30[else]10[end]" cols="60" name="itemcontent">[item_content]</textarea>
<textarea id="winix_content_id" rows="[if mount_type_is "cms"]30[else]10[end]" cols="60" name="itemcontent">[item_content]</textarea>
</div>
<input type="hidden" name="contenttype" value="2">
[if winix_function_param_is "full"]
@@ -39,21 +48,24 @@
[end]
[if-no user_logged]
<p class="withnext" style="text-indent: 0;">{nick}:</p>
<input class="edit" type="text" name="guestname" value="[item_guest_name]">
<p class="withnext" style="text-indent: 0;">{rebus_how_is_it} [rebus_question]?</p>
<input class="edit" type="text" name="rebus">
<div class="winix_input_a">
<label for="winix_nick_id">{nick}:</label>
<input id="winix_nick_id" type="text" name="guestname" value="[item_guest_name]">
</div>
<div class="winix_input_a">
<label for="winix_rebus_id">{rebus_how_is_it} [rebus_question]?</p>
<input id="winix_rebus_id" type="text" name="rebus">
</div>
[end]
<input class="submit" type="submit" value="[if item_is]{change}[else]{add}[end]">
<input type="submit" value="[if item_is]{change}[else]{add}[end]">
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
</fieldset>
</form>
</div>
+3 -1
View File
@@ -1,6 +1,7 @@
<div class="winix">
<h1>{cp_header}</h1>
[include "error.html"]
<form id="additem" method="post" action="[doc_base_url][dir][if-one item_is][item_url]/[end]cp[if-no item_is]/r[end]">
<fieldset>
@@ -35,3 +36,4 @@
</div>
+4 -2
View File
@@ -1,6 +1,7 @@
<div class="winix">
<h1>{create_thread_header}</h1>
[include "error.html"]
<form id="additem" method="post" action="[doc_base_url][dir]createthread">
@@ -10,7 +11,7 @@
<p class="withnext">{title}:</p>
<input class="edit" type="text" name="subject" value="[item_subject]">
[if mount_thread_arg_is "subject"]
[if thread_mount_arg_is "subject"]
<p class="withnext">{suggested_url}:</p>
<input class="edit" type="text" name="url" value="[item_url]">
[end]
@@ -33,3 +34,4 @@
</fieldset>
</form>
</div>
+36 -30
View File
@@ -1,32 +1,29 @@
<div class="winix">
[# this template is used in fun_editticket.html as well]
[if item_is]<h1>{edit_ticket_header}</h1>[else]<h1>{create_ticket_header}</h1>[end]
[include "error.html"]
<form id="additem" method="post" action="[doc_base_url][dir][if item_is][item_url]/editticket[else]createticket[end]" enctype="multipart/form-data">
<fieldset>
<form method="post" action="[doc_base_url][dir][if item_is][item_url]/editticket[else]createticket[end]" enctype="multipart/form-data">
[if item_is]
<legend>{form_edit_ticket_legend}</legend>
[else]
<legend>{form_create_ticket_legend}</legend>
[end]
<p class="withnext">{title}:</p>
<input class="edit" type="text" name="subject" value="[item_subject]">
<div class="winix_input_a">
<label for="winix_title_id">{title}:</label>
<input id="winix_title_id" type="text" name="subject" value="[item_subject]">
</div>
[if ticket_tab]
<table class="ticket">
<table class="winix_create_ticket">
[for ticket_tab]
<tr>
<th>[ticket_tab_param_name]:</th>
<th>[filter fil_firstup][ticket_tab_param_name]:[end]</th>
<td>
@@ -54,8 +51,8 @@
<img src="[doc_base_url][ticket_tab_file_tab_path]/-/thumb" alt="[ticket_tab_file_tab_path]" height="150">
[end]
<input size="30" class="edit" type="file" name="ticketparam[ticket_tab_param_id]" multiple>
<input class="filesubmit" type="submit" name="fileuploadsubmit" value="{add}">
<input size="30" type="file" name="ticketparam[ticket_tab_param_id]" multiple>
<input type="submit" name="fileuploadsubmit" value="{add}">
[end]
@@ -68,8 +65,8 @@
</ul>
[end]
<input size="30" class="edit" type="file" name="ticketparam[ticket_tab_param_id]" multiple>
<input class="filesubmit" type="submit" name="fileuploadsubmit" value="{add}">
<input size="30" type="file" name="ticketparam[ticket_tab_param_id]" multiple>
<input type="submit" name="fileuploadsubmit" value="{add}">
[end]
[if-any-no ticket_tab_type_is "images" ticket_tab_type_is "files" ticket_is_creating_new ticket_tab_has_value]
@@ -85,31 +82,36 @@
[end]
[# !! change names form_emacs_content_thread and form_emacs_content_ticket]
<p class="withnext">{form_emacs_content_ticket}</p>
<textarea class="multitext" rows="10" cols="60" name="itemcontent">[item_content]</textarea>
[# FIXME !! change names form_emacs_content_thread and form_emacs_content_ticket]
<div class="winix_input_a">
<label for="winix_content_id">{form_emacs_content_ticket}</label>
<textarea id="winix_content_id" rows="10" cols="60" name="itemcontent">[item_content]</textarea>
</div>
<p class="withnext">{form_emacs_content_type}</p>
<select name="contenttype" class="contenttype">
<div class="winix_input_a">
<label for="winix_content_type_id">{form_emacs_content_type}</label>
<select id="winix_content_type_id" name="contenttype">
<option[if item_content_type_is "text"] selected[end] value="0">{form_emacs_content_type_text}</option>
<option[if item_content_type_is "formatted text"] selected[end] value="1">{form_emacs_content_type_formatted_text}</option>
[if-one user_can_use_html]<option[if item_content_type_is "html"] selected[end] value="2">{form_emacs_content_type_html}</option>[end]
[if-one user_can_use_bbcode]<option[if item_content_type_is "bbcode"] selected[end] value="3">{form_emacs_content_type_bbcode}</option>[end]
[if-one user_can_use_raw]<option[if item_content_type_is "raw"] selected[end] value="4">{form_emacs_content_type_raw}</option>[end]
</select>
</div>
[if-no user_logged]
<p class="withnext">{nick}:</p>
<input class="edit" type="text" name="guestname" value="[item_guest_name]">
<div class="winix_input_a">
<label for="winix_nick_id">{nick}:</label>
<input id="winix_nick_id" type="text" name="guestname" value="[item_guest_name]">
</div>
<p class="withnext">{rebus_how_is_it} [rebus_question]?</p>
<input class="edit" type="text" name="rebus">
<div class="winix_input_a">
<label for="winix_rebus_id">{rebus_how_is_it} [rebus_question]?</p>
<input id="winix_rebus_id" type="text" name="rebus">
</div>
[end]
@@ -118,6 +120,10 @@
[end]
<input class="submit" type="submit" value="[if item_is]{form_ticket_edit_submit}[else]{form_ticket_create_submit}[end]">
</fieldset>
<input type="submit" value="[if item_is]{form_ticket_edit_submit}[else]{form_ticket_create_submit}[end]">
</form>
</div>
+3 -1
View File
@@ -1,6 +1,7 @@
<div class="winix">
<h1>{default_header}</h1>
[include "error.html"]
<form id="additem" method="post" action="[doc_base_url][dir]default">
<fieldset>
@@ -21,4 +22,5 @@
</form>
</div>
+23 -15
View File
@@ -1,34 +1,42 @@
<div class="winix">
[if item_is]<h1>{edit}</h1>[else]<h1>{add}</h1>[end]
[include "error.html"]
<form id="additem" method="post" action="[doc_base_url][dir][if item_is][item_url]/[end]emacs">
<fieldset>
<legend>{form_emacs_legend}</legend>
<form method="post" action="[doc_base_url][dir][if item_is][item_url]/[end]emacs">
<p class="withnext">{title}:</p>
<input class="edit" type="text" name="subject" value="[item_subject]">
<p class="withnext">{suggested_url}:</p>
<input class="edit" type="text" name="url" value="[item_url]">
<div class="winix_input_a">
<label for="winix_title_id">{title}:</label>
<input id="winix_title_id" type="text" name="subject" value="[item_subject]">
</div>
<div class="winix_input_a">
<label for="winix_url_id">{suggested_url}:</label>
<input id="winix_url_id" type="text" name="url" value="[item_url]">
</div>
[include "fun_emacs_post.html"]
[if-no user_logged]
<p class="withnext">{nick}:</p>
<input class="edit" type="text" name="guestname" value="[item_guest_name]">
<div class="winix_input_a">
<label for="winix_nick_id">{nick}:</label>
<input id="winix_nick_id" type="text" name="guestname" value="[item_guest_name]">
</div>
<p class="withnext">{rebus_how_is_it} [rebus_question]?</p>
<input class="edit" type="text" name="rebus">
<div class="winix_input_a">
<label for="winix_rebus_id">{rebus_how_is_it} [rebus_question]?</label>
<input id="winix_rebus_id" type="text" name="rebus">
</div>
[end]
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
<input class="submit" type="submit" value="[if item_is]{change}[else]{add}[end]">
</fieldset>
<input type="submit" value="[if item_is]{change}[else]{add}[end]">
</form>
</div>
+12 -8
View File
@@ -1,24 +1,28 @@
<div class="winix_input_a">
[if winix_function_is "upload"]
<p class="withnext">{upload_content}</p>
<label for="winix_content_id">{upload_content}</label>
[else]
[if mount_type_is "cms"]<p class="withnext">{form_emacs_content_cms}</p>[end]
[if mount_type_is "thread"]<p class="withnext">{form_emacs_content_thread}</p>[end]
[if mount_type_is "ticket"]<p class="withnext">{form_emacs_content_ticket}</p>[end]
[if mount_type_is "cms"]<label for="winix_content_id">{form_emacs_content_cms}</label>[end]
[if mount_type_is "thread"]<label for="winix_content_id">{form_emacs_content_thread}</label>[end]
[if mount_type_is "ticket"]<label for="winix_content_id">{form_emacs_content_ticket}</label>[end]
[end]
<textarea class="multitext" rows="[if winix_function_is "upload"]7[else][if mount_type_is "cms"]30[else]10[end][end]" cols="60" name="itemcontent">[item_content]</textarea>
<textarea id="winix_content_id" rows="[if winix_function_is "upload"]7[else][if mount_type_is "cms"]30[else]10[end][end]" cols="60" name="itemcontent">[item_content]</textarea>
</div>
<p class="withnext">{form_emacs_content_type}</p>
<select name="contenttype" class="contenttype">
<div class="winix_input_a">
<label for="winix_contenttype_id">{form_emacs_content_type}</label>
<select name="contenttype" id="winix_contenttype_id">
<option[if item_content_type_is "text"] selected[end] value="0">{form_emacs_content_type_text}</option>
<option[if item_content_type_is "formatted text"] selected[end] value="1">{form_emacs_content_type_formatted_text}</option>
[if user_can_use_html]<option[if item_content_type_is "html"] selected[end] value="2">{form_emacs_content_type_html}</option>[end]
[if user_can_use_bbcode]<option[if item_content_type_is "bbcode"] selected[end] value="3">{form_emacs_content_type_bbcode}</option>[end]
[if user_can_use_raw]<option[if item_content_type_is "raw"] selected[end] value="4">{form_emacs_content_type_raw}</option>[end]
</select>
</div>
+4
View File
@@ -1,3 +1,5 @@
<div class="winix">
<h1>{env_header}</h1>
@@ -50,3 +52,5 @@
</fieldset>
</form>
</div>
+3 -8
View File
@@ -1,3 +1,5 @@
<div class="winix">
<h1>Export</h1>
@@ -22,11 +24,4 @@
</form>
</div>
+3
View File
@@ -1,3 +1,5 @@
<div class="winix">
[if mount_page_arg_is "subject"][if mount_page_arg_is "info"]<h1 class="withinfo">[else]<h1>[end][dir_last_subject]</h1>[end]
[if mount_page_arg_is "info"][include "dir_last_info.html"][end]
@@ -77,3 +79,4 @@
[end]
</div>
+42
View File
@@ -0,0 +1,42 @@
<div class="winix">
<h1>IP Banned</h1>
[if ipban_tab]
<table>
<tr>
<th>Id</th>
<th>IP address</th>
<th>login failures</th>
<th>Login allowed</th>
<th>Ban level</th>
<th>Active flag</th>
<th>Last used</th>
<th>Expires</th>
<th>Remove</th>
</tr>
[for ipban_tab]
<tr>
<td>[ipban_tab_id]</td>
<td>[ipban_tab_ip]</td>
<td>[ipban_tab_incorrect_login]</td>
<td>[if ipban_tab_is_logging_allowed]yes[else]no[end]</td>
<td>[ipban_tab_ban_level]</td>
<td>[if ipban_tab_has_active_flag]yes[end]</td>
<td>[ipban_tab_last_used]</td>
<td>[ipban_tab_expires]</td>
<td><a href="[doc_base_url][dir][if item_is][item_url]/[end]ipban/removeip:[ipban_tab_ip]">remove</a></td>
</tr>
[end]
</table>
[else]
<p>There are not any IP addresses banned at the moment.</p>
[end]
</div>
+3
View File
@@ -1,3 +1,5 @@
<div class="winix">
<h1 class="simple">{last_header}</h1>
[if-one last_tab]
@@ -12,3 +14,4 @@
[end]
</div>
+3 -1
View File
@@ -1,6 +1,7 @@
<div class="winix">
<h1>{ln_header}</h1>
[include "error.html"]
<form id="additem" method="post" action="[doc_base_url][dir]ln">
<fieldset>
@@ -33,4 +34,5 @@
</form>
</div>
+3
View File
@@ -1,3 +1,5 @@
<div class="winix">
<h1>{locale_header}</h1>
[if user_has_correct_locale]
@@ -31,3 +33,4 @@
</div>
+39 -11
View File
@@ -1,23 +1,51 @@
<div class="winix">
<h1>{login_header}</h1>
[if-one user_logged]
<p>{logged_as_long}: [user_name]<br>
<a href="[doc_base_url][if-one dir_can_read_exec][dir][if-any item_is item_can_read][item_url]/[end][else]/[end]logout">{logout}</a></p>
[else]
<form id="additem" method="post" action="[login_path]login">
<fieldset>
<legend>{form_login_legend}:</legend>
<input class="editshort" type="text" name="login">
<input class="editshort" type="password" name="password">
<label><input class="remember" type="checkbox" name="rememberme">{remember_me}</label>
<input class="submit" type="submit" value="{button_login}">
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[if login_cannot_login]
<p>{login_cannot_login_from_this_ip}<br>
{login_cannot_login_available} [login_when_available_login]</p>
[else]
<form method="post" action="[login_path]login">
<div class="winix_input_b">
<input type="text" name="login">
</div>
<div class="winix_input_b">
<input type="password" name="password">
</div>
<div class="winix_input_b">
<input id="winix_login_rememberme_id" type="checkbox" name="rememberme">
<label for="winix_login_rememberme_id">{remember_me}</label>
</div>
[if login_should_use_captcha]
<div class="winix_input_a">
<label for="winix_rebus_id">{rebus_how_is_it} [rebus_question]?</label>
<input id="winix_rebus_id" type="text" name="rebus">
</div>
[end]
<input type="submit" value="{button_login}">
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
</form>
[end]
</fieldset>
</form>
[end]
</div>
+4 -3
View File
@@ -1,3 +1,5 @@
<div class="winix">
[if winix_function_param_is "ckeditor_browse"]
@@ -27,8 +29,6 @@
<div id="winix_ls_browse_rightcolumn">
[if-any item_tab]
<h2>{ls_pictures_in_dir} [dir]</h2>
@@ -59,7 +59,7 @@
[if-one dir_childs_tab item_tab]
<table class="withoutborder">
<table>
[for dir_childs_tab]
<tr>
<td>d</td>
@@ -132,5 +132,6 @@
</div>
+3
View File
@@ -1,3 +1,5 @@
<div class="winix">
<h1>{man_header}</h1>
<h2>{man_winix_funcions}</h2>
@@ -27,3 +29,4 @@
</table>
</div>
+5
View File
@@ -1,3 +1,5 @@
<div class="winix">
<h1>{meta_header}</h1>
[if item_is]
@@ -35,3 +37,6 @@
<pre>[dir_last_meta_str]</pre>
[end]
[end]
</div>
+3 -1
View File
@@ -1,6 +1,7 @@
<div class="winix">
<h1>{mkdir_header}</h1>
[include "error.html"]
<form id="additem" method="post" action="[doc_base_url][dir]mkdir">
@@ -19,5 +20,6 @@
</fieldset>
</form>
</div>
+5 -2
View File
@@ -1,9 +1,11 @@
<div class="winix">
<h1>{mount_header}</h1>
<h2>{mount_current}:</h2>
<table class="mountpoints">
<table class="winix_mountpoints">
<tr>
<th>{mount_type}</th>
<th>{mount_dir}</th>
@@ -26,7 +28,7 @@
<h2>{mount_table}:</h2>
[if mount_tab]
<table class="mountpoints">
<table class="winix_mountpoints">
<tr>
<th>{mount_type}</th>
@@ -50,3 +52,4 @@
[end]
</div>
+3 -1
View File
@@ -1,6 +1,7 @@
<div class="winix">
<h1>{mv_header}</h1>
[include "error.html"]
<form id="additem" method="post" action="[doc_base_url][dir][if-one item_is][item_url]/[end]mv">
<fieldset>
@@ -27,5 +28,6 @@
</fieldset>
</form>
</div>
+4 -2
View File
@@ -1,6 +1,7 @@
<div class="winix">
[if item_is]<h1>{edit}</h1>[else]<h1>{add}</h1>[end]
[include "error.html"]
<form id="additem" method="post" action="[doc_base_url][dir][if item_is][item_url]/[end]nicedit">
<fieldset>
@@ -14,7 +15,7 @@
<input class="edit" type="text" name="url" value="[item_url]">
[end]
[if-any mount_type_is "thread" mount_thread_arg_is "subject"]
[if-any mount_type_is "thread" thread_mount_arg_is "subject"]
<p class="withnext">{title}:</p>
<input class="edit" type="text" name="subject" value="[item_subject]">
@@ -58,3 +59,4 @@
</form>
</div>
+27 -16
View File
@@ -1,31 +1,42 @@
<div class="winix">
<h1>{passwd_header}</h1>
<form id="additem" method="post" action="[doc_base_url][dir]passwd">
<fieldset>
<legend>{passwd_form_legend}</legend>
<form method="post" action="[doc_base_url][dir]passwd">
[if user_super_user]
<p class="withnext">{passwd_login}:</p>
<select name="login" class="users">
[for user_tab]
<option [if user_tab_is_current]selected[end]>[user_tab_name]</option>
[end]
<div class="winix_input_a">
<label for="winix_users_id">{passwd_login}:</label>
<select name="login" id="winix_users_id">
[for user_tab]
<option [if user_tab_is_current]selected[end]>[user_tab_name]</option>
[end]
</div>
</select>
[else]
<p class="withnext">{passwd_current_password}:</p>
<input class="edit" type="password" name="passwordcur" value="">
<div class="winix_input_a">
<label for="winix_current_pass_id">{passwd_current_password}:</label>
<input id="winix_current_pass_id" type="password" name="passwordcur" value="">
</div>
[end]
<p class="withnext">{passwd_new_password}:</p>
<input class="edit" type="password" name="passwordnew" value="">
<div class="winix_input_a">
<label for="winix_pass_new_id">{passwd_new_password}:</label>
<input id="winix_pass_new_id" type="password" name="passwordnew" value="">
</div>
<p class="withnext">{passwd_confirm_new_password}:</p>
<input class="edit" type="password" name="passwordconfirm" value="">
<div class="winix_input_a">
<label for="winix_pass_new_confirm_id">{passwd_confirm_new_password}:</label>
<input id="winix_pass_new_confirm_id" type="password" name="passwordconfirm" value="">
</div>
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
<input class="submit" type="submit" value="{passwd_submit}">
</fieldset>
<input type="submit" value="{passwd_submit}">
</form>
</div>
+3 -1
View File
@@ -1,9 +1,10 @@
<div class="winix">
[# this template is for following functions: priv, chmod, chown]
<h1>{priv_header}</h1>
[include "error.html"]
[if-no winix_function_param_is "r"]
@@ -126,4 +127,5 @@
[end]
</div>
+4
View File
@@ -1,3 +1,5 @@
<div class="winix">
<h1>Pw</h1>
[if winix_function_param_is "resetpassword"]
@@ -54,3 +56,5 @@
[end]
</div>
+3 -1
View File
@@ -1,6 +1,7 @@
<div class="winix">
<h1>{reload_header}</h1>
[include "error.html"]
<p>{reload_select}:</p>
@@ -22,3 +23,4 @@
</ul>
</div>
+31 -21
View File
@@ -1,43 +1,52 @@
<div class="winix">
<h1>{thread_header_reply}</h1>
[include "error.html"]
<form method="post" action="[doc_base_url][dir][item_url]/reply">
<form id="additem" method="post" action="[doc_base_url][dir][item_url]/reply">
<fieldset>
<legend>{form_thread_reply}</legend>
[if thread_mount_arg_is "subject"]
<div class="winix_input_a">
<label for="">{title}:</label>
<input type="text" name="subject" value="">
</div>
[if mount_thread_arg_is "subject"]
<p class="withnext">{title}:</p>
<input class="edit" type="text" name="subject" value="">
<p class="withnext">{suggested_url}:</p>
<input class="edit" type="text" name="url" value="">
<div class="winix_input_a">
<label for="">{suggested_url}:</label>
<input type="text" name="url" value="">
</div>
[end]
[if mount_type_is "thread"]<p class="withnext">{form_emacs_content_thread}</p>[end]
<textarea class="multitext" rows="10" cols="60" name="itemcontent"></textarea>
<div class="winix_input_a">
[if mount_type_is "thread"]<label for="winix_content_id">{form_emacs_content_thread}</label>[end]
<textarea id="winix_content_id" rows="10" cols="60" name="itemcontent"></textarea>
</div>
<p class="withnext">{form_emacs_content_type}</p>
<select name="contenttype" class="contenttype">
<div class="winix_input_a">
<label for="">{form_emacs_content_type}</label>
<select name="contenttype">
<option value="0">{form_emacs_content_type_text}</option>
<option selected value="1">{form_emacs_content_type_formatted_text}</option>
[if user_can_use_html]<option value="2">{form_emacs_content_type_html}</option>[end]
[if user_can_use_bbcode]<option value="3">{form_emacs_content_type_bbcode}</option>[end]
[if user_can_use_raw]<option value="4">{form_emacs_content_type_raw}</option>[end]
</select>
</div>
[if-no user_logged]
<p class="withnext">{nick}:</p>
<input class="edit" type="text" name="guestname" value="">
<div class="winix_input_a">
<label for="">{nick}:</label>
<input type="text" name="guestname" value="">
</div>
<p class="withnext">{rebus_how_is_it} [rebus_question]?</p>
<input class="edit" type="text" name="rebus">
<div class="winix_input_a">
<label for="">{rebus_how_is_it} [rebus_question]?</p>
<input type="text" name="rebus">
</div>
[end]
[if winix_function_param_is "postredirect"]
@@ -45,7 +54,8 @@
[end]
<input class="submit" type="submit" value="{add}">
</fieldset>
<input type="submit" value="{add}">
</form>
</div>
+3
View File
@@ -1,3 +1,5 @@
<div class="winix">
<h1>{rm_header}</h1>
<form id="additem" method="post" action="[doc_base_url][dir][if-one item_is][item_url]/[end]rm[if-no item_is]/r[end]">
@@ -40,3 +42,4 @@
</fieldset>
</form>
</div>
+5
View File
@@ -1,3 +1,5 @@
<div class="winix">
<h1>{rmuser_header}</h1>
[if user_logged]
@@ -29,3 +31,6 @@
</form>
[end]
</div>
+7 -2
View File
@@ -1,16 +1,20 @@
<div class="winix">
[if mount_page_arg_is "subject"]<h1[if mount_page_arg_is "info"] class="withinfo"[end]>[dir_last_subject]</h1>[end]
[if mount_page_arg_is "info"][include "dir_last_info.html"][end]
[if thread_can_create]
<ul class="itemmenu">
<div class="winix_itemoptions_b">
<ul>
<li><a href="[doc_base_url][dir]createthread" rel="nofollow">{thread_create_new}</a></li>
</ul>
</div>
[end]
[if thread_sort_tab]
<table class="forum">
<table class="winix_forum">
<tr><th>{thread_tab_title}</th><th>{thread_tab_author}</th><th>{thread_tab_replies}</th><th>{thread_tab_last_post}</th></tr>
[for thread_sort_tab]
<tr>
@@ -23,5 +27,6 @@
[end]
</div>
+10 -5
View File
@@ -1,16 +1,20 @@
<div class="winix">
[if mount_page_arg_is "subject"]<h1[if mount_page_arg_is "info"] class="withinfo"[end]>[dir_last_subject]</h1>[end]
[if mount_page_arg_is "info"][include "dir_last_info.html"][end]
[if ticket_can_create]
<ul class="itemmenu">
<li><a href="[doc_base_url][dir]createticket" rel="nofollow">{ticket_create_new}</a></li>
</ul>
<div class="winix_itemoptions_b">
<ul>
<li><a href="[doc_base_url][dir]createticket" rel="nofollow">{ticket_create_new}</a></li>
</ul>
</div>
[end]
[if tickets_tab]
<table class="tickettab">
<table class="winix_tickets_tab">
<tr>
<th>{tickets_header_name}</th>
@@ -29,7 +33,7 @@
[for tickets_tab]
<tr>
<td class="tickettabtitle"><a href="[doc_base_url][dir][tickets_tab_url]">[if-no tickets_tab_subject_empty][tickets_tab_subject][else]&lt;[tickets_tab_url]&gt;[end]</a></td>
<td class="winix_tickets_tab_title"><a href="[doc_base_url][dir][tickets_tab_url]">[if-no tickets_tab_subject_empty][tickets_tab_subject][else]&lt;[tickets_tab_url]&gt;[end]</a></td>
[for tickets_tab_conf_tab]
[if-any-no tickets_tab_conf_tab_type_is "images" tickets_tab_conf_tab_type_is "files"]
[if tickets_tab_conf_tab_type_is "progress"]
@@ -54,4 +58,5 @@
</div>
+20 -13
View File
@@ -1,30 +1,36 @@
<div class="winix">
<h1>{sort_header}</h1>
<p>{sort_info1}</p>
[if item_is]
<form id="additem" action="[doc_base_url][dir][item_url]/sort" method="post">
<div>
<p class="withnext">{sort_current_sortindex}:</p>
<input class="editshort" type="text" name="sortindex" value="[item_sort]">
<input class="submit" type="submit" value="{change}">
<form class="winix_sortable_form" action="[doc_base_url][dir][item_url]/sort" method="post">
<div class="winix_input_b">
<label for="">{sort_current_sortindex}:</p>
<input type="text" name="sortindex" value="[item_sort]">
</div>
<input type="submit" value="{change}">
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
</div>
</form>
[else]
<p>{sort_info_multi}</p>
[if item_tab]
<form id="additem" action="[doc_base_url][dir]sort" method="post">
<div>
<ul id="sortable">
<form class="winix_sortable_form" action="[doc_base_url][dir]sort" method="post">
<ul id="winix_sort_items">
[for item_tab]
<li id="li[item_tab_index]">
<li id="winix_sort_item_[item_tab_index]">
<input type="text" name="sort[item_tab_id]" value="[item_tab_sort]">
[if item_tab_has_thumb]<img src="[item_tab_link]/-/thumb" alt="[item_tab_subject]">[end]
[item_tab_url]
@@ -36,9 +42,10 @@
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
<input class="submit" type="submit" value="{change}">
</div>
<input type="submit" value="{change}">
</form>
[end]
[end]
</div>
+6
View File
@@ -1,3 +1,5 @@
<div class="winix">
<h1 class="simple">{stat_header}</h1>
<table class="withoutborder">
@@ -20,3 +22,7 @@
</td></tr>
</table>
</div>
+3 -1
View File
@@ -1,6 +1,7 @@
<div class="winix">
<h1>{subject_header}</h1>
[include "error.html"]
<form id="additem" method="post" action="[doc_base_url][dir][if-one item_is][item_url]/[end]subject">
<fieldset>
@@ -19,3 +20,4 @@
</div>
+5 -1
View File
@@ -1,6 +1,7 @@
<div class="winix">
<h1>{template_header}</h1>
[include "error.html"]
<p>
@@ -67,3 +68,6 @@
</fieldset>
</form>
</div>
+17 -11
View File
@@ -1,17 +1,21 @@
[if mount_page_arg_is "subject"]<h1[if mount_page_arg_is "info"] class="withinfo"[end]>[item_subject]</h1>[end]
<div class="winix">
[if mount_page_arg_is "subject"]<h1[if mount_page_arg_is "info"] class="winix_withinfo"[end]>[item_subject]</h1>[end]
[if mount_page_arg_is "info"][include "item_info.html"][end]
[if thread_can_reply]
<ul class="itemmenu">
<div class="winix_itemoptions_b">
<ul>
<li><a href="[doc_base_url][dir][item_url]/reply" rel="nofollow">{thread_reply_in_this_thread}</a></li>
</ul>
</div>
[end]
[if-no thread_mount_arg_is "sort_desc"]
<div class="threadbox">
[if item_can_write]<a class="threadedit" href="[item_link]/emacs" rel="nofollow">\[{edit}\]</a>[end]
[if thread_mount_arg_is "subject"]<h2[if thread_mount_arg_is "info"] class="withinfo"[end]>[item_subject]</h2>[end]
<div class="winix_threadbox">
[if item_can_write]<a class="winix_threadedit" href="[item_link]/emacs" rel="nofollow">\[{edit}\]</a>[end]
[if thread_mount_arg_is "subject"]<h2[if thread_mount_arg_is "info"] class="winix_withinfo"[end]>[item_subject]</h2>[end]
[if thread_mount_arg_is "info"][include "item_info.html"][end]
[item_print_content]
</div>
@@ -19,21 +23,23 @@
[for thread_sort_tab]
<div class="threadbox[if-index even] threadboxcolor[end]">
[if thread_sort_tab_can_write]<a class="threadedit" href="[thread_sort_tab_link]/emacs" rel="nofollow">\[{edit}\]</a>[end]
[if thread_mount_arg_is "subject"]<h2[if thread_mount_arg_is "info"] class="withinfo"[end]>[thread_sort_tab_subject]</h2>[end]
<div class="winix_threadbox[if-index even] winix_threadboxcolor[end]">
[if thread_sort_tab_can_write]<a class="winix_threadedit" href="[thread_sort_tab_link]/emacs" rel="nofollow">\[{edit}\]</a>[end]
[if thread_mount_arg_is "subject"]<h2[if thread_mount_arg_is "info"] class="winix_withinfo"[end]>[thread_sort_tab_subject]</h2>[end]
[if thread_mount_arg_is "info"][include "thread_sort_tab_info.html"][end]
[thread_sort_tab_print_content]
</div>
[end]
[if thread_mount_arg_is "sort_desc"]
<div class="threadbox">
[if item_can_write]<a class="threadedit" href="[item_link]/emacs" rel="nofollow">\[{edit}\]</a>[end]
[if thread_mount_arg_is "subject"]<h2[if thread_mount_arg_is "info"] class="withinfo"[end]>[item_subject]</h2>[end]
<div class="winix_threadbox">
[if item_can_write]<a class="winix_threadedit" href="[item_link]/emacs" rel="nofollow">\[{edit}\]</a>[end]
[if thread_mount_arg_is "subject"]<h2[if thread_mount_arg_is "info"] class="winix_withinfo"[end]>[item_subject]</h2>[end]
[if thread_mount_arg_is "info"][include "item_info.html"][end]
[item_print_content]
</div>
[end]
</div>
+8 -4
View File
@@ -1,10 +1,12 @@
<div class="winix">
[if mount_page_arg_is "subject"]<h1[if mount_page_arg_is "info"] class="withinfo"[end]>[item_subject]</h1>[end]
[if mount_page_arg_is "info"][include "item_info.html"][end]
<div class="ticketinfo">
[if ticket_can_edit]<p class="edit"><a href="[doc_base_url][dir][item_url]/editticket" rel="nofollow">\[{edit}\]</a></p>[end]
<div class="winix_ticket">
[if ticket_can_edit]<p class="winix_ticket_edit"><a href="[doc_base_url][dir][item_url]/editticket" rel="nofollow">\[{edit}\]</a></p>[end]
<table>
[for ticket_tab]
[if ticket_tab_has_value]
@@ -15,7 +17,7 @@
[if ticket_tab_type_is "images"]
[for ticket_tab_file_tab]
<a href="[doc_base_url][ticket_tab_file_tab_path]" rel="lightbox\[a\]" class="picture">
<a href="[doc_base_url][ticket_tab_file_tab_path]" rel="lightbox\[a\]">
<img src="[doc_base_url][ticket_tab_file_tab_path]/-/thumb" alt="[ticket_tab_file_tab_path]" height="150">
</a>
[end]
@@ -47,7 +49,7 @@
[if winix_has_plugin "thread"]
[if thread_can_reply]
<ul class="itemmenu">
<ul class="winix_itemoptions_b">
<li><a href="[doc_base_url][dir][item_url]/reply" rel="nofollow">{thread_reply_in_this_thread}</a></li>
</ul>
[end]
@@ -64,3 +66,5 @@
[end]
</div>
+3
View File
@@ -1,3 +1,5 @@
<div class="winix">
<h1>{timezone_header}</h1>
[if user_has_correct_time_zone]
@@ -29,4 +31,5 @@
</form>
</div>
+4 -2
View File
@@ -1,6 +1,7 @@
<div class="winix">
[if item_is]<h1>{edit}</h1>[else]<h1>{add}</h1>[end]
[include "error.html"]
<form id="additem" method="post" action="[doc_base_url][dir][if item_is][item_url]/[end]tinymce">
@@ -15,7 +16,7 @@
<input class="edit" type="text" name="url" value="[item_url]">
[end]
[if-any mount_type_is "thread" mount_thread_arg_is "subject"]
[if-any mount_type_is "thread" thread_mount_arg_is "subject"]
<p class="withnext">{title}:</p>
<input class="edit" type="text" name="subject" value="[item_subject]">
@@ -49,3 +50,4 @@
</form>
</div>
+3
View File
@@ -1,3 +1,5 @@
<div class="winix">
<h1>{uname_header}</h1>
<p>Winix [sys_ver_major].[sys_ver_minor].[sys_ver_revision]</p>
@@ -16,3 +18,4 @@
[end]
</div>
+5
View File
@@ -1,4 +1,5 @@
[if winix_function_param_is "ckeditor_upload"]
<script type="text/javascript">window.parent.CKEDITOR.tools.callFunction([upload_ckeditor_funnum], '[item_link]');</script>
[end]
@@ -24,6 +25,8 @@
[if-any-no winix_function_param_is "ckeditor_upload" winix_function_param_is "jquery_upload"]
<div class="winix">
<h1>{upload_header}</h1>
[# The file upload form used as target for the file upload widget]
@@ -189,5 +192,7 @@
\});
\});</script>
</div>
[end]
+3
View File
@@ -1,3 +1,5 @@
<div class="winix">
<h1>{uptime_header}</h1>
<p>{uptime_current_time}: [winix_cur_time]<br>
@@ -16,3 +18,4 @@
</p>
</div>
+4 -2
View File
@@ -1,6 +1,7 @@
<div class="winix">
[if item_is]<h1>{edit}</h1>[else]<h1>{add}</h1>[end]
[include "error.html"]
<form id="additem" method="post" action="[doc_base_url][dir][if item_is][item_url]/[end]vim">
<fieldset>
@@ -14,7 +15,7 @@
<input class="edit" type="text" name="url" value="[item_url]">
[end]
[if-any mount_type_is "thread" mount_thread_arg_is "subject"]
[if-any mount_type_is "thread" thread_mount_arg_is "subject"]
<p class="withnext">{title}:</p>
<input class="edit" type="text" name="subject" value="[item_subject]">
@@ -51,3 +52,4 @@
</form>
</div>
+3 -1
View File
@@ -1,3 +1,5 @@
<div class="winix">
<h1>{who_header}</h1>
@@ -13,5 +15,5 @@
[end]
</div>
+17 -42
View File
@@ -1,50 +1,25 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<!DOCTYPE html>
[# minimalistic template]
<html lang="{language}">
[include "index_head.html"]
<head>
<meta charset="{charset}">
<title>[doc_title]</title>
<link rel="stylesheet" href="[doc_base_url_common]/winix/winix.css">
[include "index_head_functions_add.html"]
</head>
[# now we don't need the check of fullscreen here]
[# we've got a second template for fullscreen -- index_fullscreen.html]
[if-no winix_function_param_is "fullscreen"]
<body>
<body>
<div id="winix_container">
[include "index_header.html"]
[if-no winix_show_content_in_full_window]
<div id="winix_middle">
[include "index_contentmenu.html"]
<div id="winix_contentright">
[include "slog.html"]
[content]
</div> <!-- winix_contentright -->
</div> <!-- winix_middle -->
[else]
<div id="winix_contentfull">
[include "slog.html"]
[content]
</div> <!-- winix_contentfull -->
[end]
[include "index_footer.html"]
</div> <!-- winix_container -->
</body>
<div>
[include "slog.html"]
[# each winix function has div.winix in its template defined -- only functions: cat and run don't have div.winix]
[# so you can easly use 'content' with your own template]
[# and when using other winix functions you automatically get proper styling]
[content]
</div>
[else]
<body>
<div id="winix_containerfull">
[include "slog.html"]
[content]
</div> <!-- winix_containerfull -->
</body>
[end] [# if-no winix_function_param_is "fullscreen"]
</html>
-12
View File
@@ -1,12 +0,0 @@
<div id="winix_contentleft">
<h2>Menu</h2>
<ul class="winix_menu">
<li><a href="[doc_base_url]/">menu 1</a></li>
<li><a href="[doc_base_url]/">menu 2</a></li>
<li><a href="[doc_base_url]/">menu 3</a></li>
</ul>
</div> <!-- winix_contentleft -->
-4
View File
@@ -1,4 +0,0 @@
<div id="winix_footer">
</div> <!-- winix_footer -->
+12 -17
View File
@@ -1,30 +1,25 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<!DOCTYPE html>
[# minimalistic template]
<html lang="{language}">
<head>
<meta charset="{charset}">
<title>[doc_title]</title>
<meta http-equiv="content-type" content="text/html; charset={charset}">
[if doc_css_tab]
[for doc_css_tab]
<link rel="stylesheet" href="[if-no doc_css_tab_file_is_global][doc_base_url_static][end][doc_css_tab_file]" type="text/css">
[end]
[else]
<link rel="stylesheet" href="[doc_base_url_static]/winix/winix.css" type="text/css">
[end]
<link rel="stylesheet" href="[doc_base_url_common]/winix/winix.css">
[include "index_head_functions_add.html"]
</head>
<body>
<div id="winix_containerfull">
[include "slog.html"]
[content]
</div> <!-- winix_containerfull -->
<div>
[include "slog.html"]
[# each winix function has div.winix in its template defined -- only functions: cat and run don't have div.winix]
[# so you can easly use 'content' with your own template]
[# and when using other winix functions you automatically get proper styling]
[content]
</div>
</body>
</html>
-11
View File
@@ -1,11 +0,0 @@
<head>
<title>[doc_title]</title>
<meta http-equiv="content-type" content="text/html; charset={charset}">
<meta name="description" content="">
<meta name="keywords" content="">
<link rel="stylesheet" href="[doc_base_url_static]/winix/winix.css" type="text/css">
<link rel="shortcut icon" href="[doc_base_url_static]/favicon.ico">
[include "index_head_functions_add.html"]
</head>
+44
View File
@@ -1,5 +1,49 @@
[# other stuff needed by a specific function]
[if-one winix_function_is "adduser"
winix_function_is "chmod"
winix_function_is "chown"
winix_function_is "ckeditor"
winix_function_is "cp"
winix_function_is "default"
winix_function_is "download"
winix_function_is "emacs"
winix_function_is "env"
winix_function_is "last"
winix_function_is "ln"
winix_function_is "locale"
winix_function_is "login"
winix_function_is "logout"
winix_function_is "ls"
winix_function_is "man"
winix_function_is "meta"
winix_function_is "mkdir"
winix_function_is "mount"
winix_function_is "mv"
winix_function_is "nicedit"
winix_function_is "node"
winix_function_is "passwd"
winix_function_is "priv"
winix_function_is "pw"
winix_function_is "reload"
winix_function_is "rm"
winix_function_is "rmuser"
winix_function_is "sort"
winix_function_is "stat"
winix_function_is "subject"
winix_function_is "template"
winix_function_is "timezone"
winix_function_is "tinymce"
winix_function_is "uname"
winix_function_is "upload"
winix_function_is "uptime"
winix_function_is "vim"
winix_function_is "who"]
<link rel="stylesheet" href="[doc_base_url_common]/winix/winix.css" type="text/css">
[end]
[if winix_function_is "ckeditor"]
<script type="text/javascript" src="[doc_base_url_common]/ckeditor/ckeditor.js"></script>
[end]
-32
View File
@@ -1,32 +0,0 @@
<div id="winix_header">
[if-one user_logged]
<span id="winix_logged">{logged_as}: [user_name]<br>
<a href="[doc_base_url][if-one dir_can_read_exec][dir][if-any item_is item_can_read][item_url]/[end][else]/[end]logout">{logout}</a></span>
[else]
<form id="winix_login" method="post" action="[login_path]login">
<fieldset>
<legend>{form_login_legend}:</legend>
<input class="edit" type="text" name="login">
<input class="edit" type="password" name="password">
<input class="submit" type="submit" value="{button_login}">
<p><label><input class="remember" type="checkbox" name="rememberme">{remember_me}</label></p>
</fieldset>
</form>
[end]
<a href="[doc_base_url]" id="winix_logo">{home_page}</a>
[if-one dir_tab]
<ul id="winix_current_dir">
[for dir_tab]
<li><a href="[doc_base_url][dir_tab_link]">[dir_tab_url] /&nbsp;</a></li>
[end]
[if-one item_is]
<li><a href="[item_link]">[item_url]</a></li>
[end]
</ul>
[end]
</div> <!-- winix_header -->
+1 -1
View File
@@ -1,4 +1,4 @@
<p class="iteminfo">
<p class="winix_iteminfo">
{added_by}: [item_user], [item_date_creation_nice][if-no item_dates_equal],
{last_modified}[if item_users_different] {by}: [item_modification_user],[else]:[end]
[item_date_modification_nice][end]

Some files were not shown because too many files have changed in this diff Show More