Compare commits

30 Commits

Author SHA1 Message Date
tomasz.sowa 8d9a021eab changed: when there is reqtype:json parameter and there is not set request.ajax_serializer
then we are using a generic json serializer
changed: we are sending the application/json header when returning an json string
added:   to config: log_server_answer (default false)
         when true we put the whole string (server's answer) to the log file
added:   to Request: use_200_status_for_not_found_and_permission_denied
         if this is true then if the server http code would be 403 or 404
         then we return 200 OK (useful when using ajax)
changed: System::RedirectTo() methods take as the last parameter: use_reqtype
         if this is true (default) then reqtype:type parameter is automatically added to the redirecting path
         




git-svn-id: svn://ttmath.org/publicrep/winix/trunk@918 e52654a7-88a9-db11-a3e9-0013d4bc506e
2013-03-26 00:04:01 +00:00
tomasz.sowa be6e09c5af added: some ezc functions (item_tab_meta*)
added: some ezc functions (gallery_tab_meta*) to gallery plugin
added: to gallery plugin: a new gallery: Gallery version 1.2.9



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@917 e52654a7-88a9-db11-a3e9-0013d4bc506e
2013-02-26 11:49:22 +00:00
tomasz.sowa 293e426ed4 fixed: plugin 'group'
Groups::ReindexGroups incorrectly read a field from a PT::Space (it used 'table' object directly)
       but the value was in 'table_single' 
       now we are using GetValue method



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@916 e52654a7-88a9-db11-a3e9-0013d4bc506e
2013-02-01 21:14:56 +00:00
tomasz.sowa 60f2337b73 updated: paths in Makefile (prog subdirectory)
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@915 e52654a7-88a9-db11-a3e9-0013d4bc506e
2013-01-19 16:31:15 +00:00
tomasz.sowa ce8152de2f changed: added 'logsave' when we are waiting for the database to be ready
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@913 e52654a7-88a9-db11-a3e9-0013d4bc506e
2013-01-19 10:10:17 +00:00
tomasz.sowa 496a1979d2 fixed: in ticket plugin: editticket incorrectly used ticket_info->Clear() method
it was called after some objects were set consequently we were not allowed to edit a ticket



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@912 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-12-30 15:33:08 +00:00
tomasz.sowa fd698ca7b9 added: put the rebus answer into the log (when user has entered an incorrect answer)
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@911 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-12-26 23:08:57 +00:00
tomasz.sowa b4b368d324 changed: Makefile dep
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@910 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-11-17 01:10:00 +00:00
tomasz.sowa 825694c880 changed: in editticket: closing ticket is better to do via POST request
added:   a new message sent by editticket when closing a ticket:
         #define WINIX_PL_TICKET_CLOSED                                 4105
         // a ticket has been closed (closed button pressed)
         // in p1 you have a pointer to the Item struct
         // in p2 you have a pointer to the Ticket struct





git-svn-id: svn://ttmath.org/publicrep/winix/trunk@909 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-11-05 23:13:52 +00:00
tomasz.sowa 32750a7d50 changed: ticket plugin: redirect type in editticket winix function (when there is 'close' parameter)
fixed:   prototype doesn't work with jquery (in ticket winix function)
         (prototype was loaded for lightbox)



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@908 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-11-04 22:39:02 +00:00
tomasz.sowa 0045c6c72c added: to Item struct: ameta (PT::Space)
admin meta information
added: option "a" to meta winix function
       editing admin meta information
changed: now if you don't have write access to an item
         you can't see the meta information
         previous if you had read access you could have seen them
added: in plugin ticket and thread
       support for 'closing' (ticket, thread)
       (this is only logic, we need some html yet)
added: some ezc function for getting meta/admin meta information
       (for the current item and the last directory)




git-svn-id: svn://ttmath.org/publicrep/winix/trunk@907 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-11-04 21:01:02 +00:00
tomasz.sowa 4809016b78 changed: html (slog.html)
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@906 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-11-01 17:56:00 +00:00
tomasz.sowa 6e2ba65524 changed: added 'check_abuse' parameter to Login::LoginUser
bool Login::LoginUser(const std::wstring & login, const std::wstring & password, bool remember_me,
                               bool use_ses_log, bool check_abuse)
         default 'false' -- it test the time between GET and POST and the rebus (if exists)



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@905 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-10-27 11:17:52 +00:00
tomasz.sowa 8033ac66c4 added: locales to fun_ipban.html
changed: cosmetic changes in IPBanContainer




git-svn-id: svn://ttmath.org/publicrep/winix/trunk@904 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-10-27 10:14:07 +00:00
tomasz.sowa 9ef3736989 added: to 'ipban' winix function:
possibility to remove a ban (or all bans)
added: to SessionManager: sorting of the ban list (in the second thread)



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@903 e52654a7-88a9-db11-a3e9-0013d4bc506e
2012-10-27 09:03:49 +00:00
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
172 changed files with 5028 additions and 3924 deletions
+2 -2
View File
@@ -6,7 +6,7 @@ CXX = g++
endif
ifndef CXXFLAGS
CXXFLAGS = -fPIC -Wall -O2 -pthread -I/usr/local/include -I/home/tomek/roboczy/winix -I/home/tomek/roboczy/ezc/src -I/home/tomek/roboczy/tito/src -I/home/tomek/roboczy/pikotools -DEZC_USE_WINIX_LOGGER -DEZC_HAS_SPECIAL_STREAM
CXXFLAGS = -fPIC -Wall -O2 -pthread -I/usr/local/include -I/home/tomek/roboczy/prog/winix -I/home/tomek/roboczy/prog/ezc/src -I/home/tomek/roboczy/prog/tito/src -I/home/tomek/roboczy/prog/pikotools -DEZC_USE_WINIX_LOGGER -DEZC_HAS_SPECIAL_STREAM
endif
ifndef LDFLAGS
@@ -38,7 +38,7 @@ winix.so: FORCE
winix: winix.so FORCE
@cd main ; $(MAKE) -e
# use the full path with winix.so
$(CXX) -o winix $(CXXFLAGS) $(LDFLAGS) main/*.o /home/tomek/roboczy/winix/winix.so
$(CXX) -o winix $(CXXFLAGS) $(LDFLAGS) main/*.o /home/tomek/roboczy/prog/winix/winix.so
+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
+113 -93
View File
@@ -2,7 +2,7 @@
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2010-2012, Tomasz Sowa
* Copyright (c) 2010-2013, Tomasz Sowa
* All rights reserved.
*
*/
@@ -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();
@@ -387,6 +366,7 @@ void App::ProcessRequest()
// simple operations which should not throw an exception
templates.RequestEnd();
cur.request->Clear();
cur.session->ClearOnEndRequest();
cur.session = session_manager.GetTmpSession();
log << logendrequest;
}
@@ -458,6 +438,7 @@ bool sent = false;
if( cur.request->ajax_serializer )
{
log << log3 << "App: sending JSON" << logend;
std::wstring & ajax_content = cur.request->ajax.Add(L"content", L"");
ajax_content = cur.request->page.Str();
cur.request->ajax_serializer->Serialize(cur.request->ajax, cur.request->ajaxpage, true);
@@ -486,6 +467,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 +476,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 +493,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();
@@ -524,6 +525,13 @@ void App::Make()
return;
}
if( !cur.request->ajax_serializer && cur.request->ParamValue(L"reqtype") == L"json")
{
log << log3 << "App: using generic JSON serializer" << logend;
ajax_generic_serializer.Clear();
cur.request->ajax_serializer = &ajax_generic_serializer;
}
plugin.Call(WINIX_CONTENT_MAKE);
MakePage();
@@ -569,7 +577,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 +612,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);
}
@@ -799,21 +809,29 @@ void App::SendHeadersStatic()
}
void App::SendHeaderContentType()
{
switch( config.content_type_header )
if( cur.request->ajax_serializer )
{
case 1:
FCGX_PutS("Content-Type: application/xhtml+xml", fcgi_request.out);
break;
FCGX_PutS("Content-Type: application/json", fcgi_request.out);
}
else
{
switch( config.content_type_header )
{
case 1:
FCGX_PutS("Content-Type: application/xhtml+xml", fcgi_request.out);
break;
case 2:
FCGX_PutS("Content-Type: application/xml", fcgi_request.out);
break;
case 2:
FCGX_PutS("Content-Type: application/xml", fcgi_request.out);
break;
case 0:
default:
FCGX_PutS("Content-Type: text/html", fcgi_request.out);
case 0:
default:
FCGX_PutS("Content-Type: text/html", fcgi_request.out);
}
}
if( config.utf8 )
@@ -828,7 +846,6 @@ void App::SendHeadersForbidden()
{
FCGX_PutS("Status: 403 Forbidden\r\n", fcgi_request.out);
SendHeaderContentType();
log << log2 << "App: response: 403 Forbidden" << logend;
}
@@ -891,7 +908,6 @@ void App::SendHeadersNormal(Header header)
case h_404:
FCGX_PutS("Status: 404 Not Found\r\n", fcgi_request.out);
SendHeaderContentType();
log << log2 << "App: response: 404 Not Found" << logend;
break;
case h_403:
@@ -969,6 +985,9 @@ void App::FilterCompressSend(bool compressing, int compress_encoding, const std:
else
AssignString(*source, source_a);
if( config.log_server_answer )
log << log1 << "App: the server's answer is:\n" << source_a << "\nApp: end of the server's answer" << logend;
if( compressing )
compress.CompressAndPut(source_a.c_str(), source_a.length(), fcgi_request.out, compress_encoding);
else
@@ -1087,10 +1106,22 @@ int compress_encoding;
SelectCompression(source->length(), compressing, compress_encoding);
if( status == WINIX_ERR_NO_ITEM || status == WINIX_ERR_NO_FUNCTION || status == WINIX_ERR_UNKNOWN_PARAM )
{
header = h_404;
log << log2 << "App: http response: 404 Not Found" << logend;
}
if( status == WINIX_ERR_PERMISSION_DENIED || status == WINIX_ERR_CANT_CHANGE_USER || status == WINIX_ERR_CANT_CHANGE_GROUP )
{
header = h_403;
log << log2 << "App: http response: 403 Forbidden" << logend;
}
if( cur.request->use_200_status_for_not_found_and_permission_denied && (header == h_404 || header == h_403) )
{
log << log3 << "App: changing the http response to: 200 OK" << logend;
header = h_200;
}
SendHeaders(compressing, compress_encoding, header);
@@ -1112,24 +1143,13 @@ void App::SendData(const BinaryPage & page, FCGX_Stream * out)
BinaryPage::const_iterator i = page.begin();
BinaryPage::const_iterator end = page.end();
// log << log1 << "size: " << page.size() << logend;
// for(size_t x=0 ; x<page.size() ; ++x)
// log << int((unsigned char)page[x]) << ' ';
// log << logend;
while( i != end )
{
size_t s = 0;
for( ; i != end && s < buf_size ; ++i, ++s)
{
send_data_buf[s] = *i;
// log << "swinka: " << int((unsigned char)*i) << logend;
}
if( s > 0 )
FCGX_PutStr(send_data_buf.c_str(), s, fcgi_request.out);
}
+4 -4
View File
@@ -2,7 +2,7 @@
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2010-2012, Tomasz Sowa
* Copyright (c) 2010-2013, Tomasz Sowa
* All rights reserved.
*
*/
@@ -122,14 +122,14 @@ private:
std::string sendh_t, sendh_t2, sendh_t3;
std::string sendfilea, sendfile2a;
std::string send_data_buf;
PT::SpaceToJSON ajax_generic_serializer;
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();
+14 -1
View File
@@ -2,7 +2,7 @@
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2008-2012, Tomasz Sowa
* Copyright (c) 2008-2013, Tomasz Sowa
* All rights reserved.
*
*/
@@ -113,6 +113,7 @@ void Config::AssignValues(bool stdout_is_closed)
log_request = Int(L"log_request", 1);
log_save_each_line = Bool(L"log_save_each_line", false);
log_time_zone_id = Size(L"log_time_zone_id", 34);
log_server_answer = Bool(L"log_server_answer", false);
log_stdout = Bool(L"log_stdout", false);
log_db_query = Bool(L"log_db_query", false);
log_plugin_call = Bool(L"log_plugin_call", false);
@@ -246,6 +247,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);
}
+73 -9
View File
@@ -2,7 +2,7 @@
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2008-2012, Tomasz Sowa
* Copyright (c) 2008-2013, Tomasz Sowa
* All rights reserved.
*
*/
@@ -71,6 +71,10 @@ public:
// default: 34 (Coordinated Universal Time UTC+00:00)
size_t log_time_zone_id;
// put to log what server is sending back to the client (html/json etc)
// default: false
bool log_server_answer;
// logging db queries
// default: false
bool log_db_query;
@@ -523,6 +527,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 +622,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);
// the output hash is not a UTF8 string
// it consists only from ascii letters
AssignString(bufouta, out);
int res = HashBin(hash, bufina.c_str(), bufina.size(), out);
bufina.clear();
return res;
}
bool Crypt::Hash(int hash, const wchar_t * in, std::wstring & out)
bool Crypt::HashBin(int hash, const wchar_t * in, std::string & out)
{
size_t len = wcslen(in);
return Hash(hash, in, len, out);
return HashBin(hash, in, len, out);
}
bool Crypt::Hash(int hash, const std::wstring & in, std::wstring & out)
bool Crypt::HashBin(int hash, const std::wstring & in, std::string & out)
{
return Hash(hash, in.c_str(), in.size(), 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::HashHex(int hash, const char * in, std::string & out)
{
size_t len = strlen(in);
return HashHex(hash, in, len, out);
}
bool Crypt::HashHex(int hash, const std::string & in, std::string & 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
+221
View File
@@ -0,0 +1,221 @@
/*
* 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 = true; // an empty list is sorted
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);
is_ipban_tab_sorted = false;
return ipban_tab.back();
}
else
{
return *old_ip_ban;
}
}
void IPBanContainer::RemoveIP(int ip)
{
IPBan * ipban = FindIP(ip);
if( ipban )
{
size_t index = ipban - &ipban_tab[0];
ipban_tab.erase(ipban_tab.begin() + index);
}
}
bool IPBanContainer::IsSorted()
{
return is_ipban_tab_sorted;
}
void IPBanContainer::Clear()
{
ipban_tab.clear();
is_ipban_tab_sorted = true;
}
// 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()
{
size_t to_remove = 0;
if( ipban_tab.size() >= soft_max_size )
to_remove = ipban_tab.size() - soft_max_size;
if( to_remove > 0 )
{
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));
sort_helper_tab.resize(to_remove);
std::sort(sort_helper_tab.begin(), sort_helper_tab.end());
while( to_remove-- > 0 )
ipban_tab.erase(ipban_tab.begin() + sort_helper_tab[to_remove]);
}
}
// for debug purposes
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;
}
}
// for debug purposes
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;
}
+58
View File
@@ -0,0 +1,58 @@
/*
* 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);
void RemoveIP(int ip);
void Clear();
bool IsSorted();
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
+1
View File
@@ -74,6 +74,7 @@ void Item::Clear()
html_template.clear();
sort_index = 0;
meta.Clear();
ameta.Clear();
SetDateToNow();
}
+1
View File
@@ -98,6 +98,7 @@ struct Item
// meta information
PT::Space meta;
PT::Space ameta;
// methods
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)
{
+47 -9
View File
@@ -2,7 +2,7 @@
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2008-2012, Tomasz Sowa
* Copyright (c) 2008-2013, Tomasz Sowa
* All rights reserved.
*
*/
@@ -224,9 +224,20 @@ 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>
@@ -261,7 +272,24 @@ typename StringType::size_type i;
template<class StringType>
void Trim(StringType & s, wchar_t c)
void TrimFirst(StringType & s, wchar_t c)
{
typename StringType::size_type i;
if( s.empty() )
return;
// looking for the 'c' characters at the beginning
for(i=0 ; i<s.size() && s[i]==c ; ++i);
// deleting the 'c' characters at the beginning
if( i != 0 )
s.erase(0, i);
}
template<class StringType>
void TrimLast(StringType & s, wchar_t c)
{
typename StringType::size_type i;
@@ -281,16 +309,23 @@ typename StringType::size_type i;
// deleting 'c' characters at the end
if( i != s.size() - 1 )
s.erase(i+1, StringType::npos);
// looking for the 'c' characters at the beginning
for(i=0 ; i<s.size() && s[i]==c ; ++i);
// deleting the 'c' characters at the beginning
if( i != 0 )
s.erase(0, i);
}
template<class StringType>
void Trim(StringType & s, wchar_t c)
{
if( s.empty() )
return;
TrimLast(s, c);
TrimFirst(s, c);
}
template<class StringType>
void MaxSize(StringType & str, size_t max_size)
{
@@ -960,4 +995,7 @@ size_t i1, i2;
#endif
+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
+3 -1
View File
@@ -149,7 +149,9 @@ bool Rebus::CheckRebus()
if( IsAnswerOk(cur->session->rebus_item, cur->request->PostVar(L"rebus")) )
return true;
log << log1 << "Rebus: rebus has an incorrect answer" << logend;
log << log1 << "Rebus: rebus has an incorrect answer, expected: "
<< cur->session->rebus_item->answer << logend;
// don't add cur->session->spam_score when the rebus has incorrect answer
// a user could have made a mistake
+4 -1
View File
@@ -2,7 +2,7 @@
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2008-2012, Tomasz Sowa
* Copyright (c) 2008-2013, Tomasz Sowa
* All rights reserved.
*
*/
@@ -127,6 +127,9 @@ void Request::Clear()
gen_trim_white = false;
gen_skip_new_line = false;
gen_use_special_chars = false;
ip = 0;
use_200_status_for_not_found_and_permission_denied = false;
}
+11 -2
View File
@@ -2,7 +2,7 @@
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2008-2012, Tomasz Sowa
* Copyright (c) 2008-2013, Tomasz Sowa
* All rights reserved.
*
*/
@@ -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;
@@ -156,12 +160,17 @@ struct Request
// used as a JSON output (when ajax_serializer is defined)
// it will be serialized and have at least:
// 'content' string - the whole html content
// 'http_status' integer - http status code (e.g. 200)
// 'http_status' integer - http status code (e.g. 200) !! FIXME this is not added at the moment
PT::Space ajax;
// if not null then the request will have a JSON as an output
PT::SpaceToJSON * ajax_serializer;
// if this variable is true then winix always return 200 OK header
// when the status would be 404 (not found) or 403 (permission denied)
// default: false
bool use_200_status_for_not_found_and_permission_denied;
// options used by ezc generators
bool gen_trim_white;
bool gen_skip_new_line;
+8
View File
@@ -78,9 +78,17 @@ void Session::Clear(bool clear_plugin_data)
log_buffer.Clear();
last_css.clear();
ip_ban = 0;
if( clear_plugin_data )
plugin_data.Resize(0);
}
// clearing some variables when a request is ended (just for safety)
void Session::ClearOnEndRequest()
{
// ip_ban list can be sorted by SessionManager (in the special thread)
ip_ban = 0;
}
+10 -1
View File
@@ -20,6 +20,7 @@
#include "rebus.h"
#include "textstream.h"
#include "date/date.h"
#include "ipban.h"
@@ -31,6 +32,7 @@ struct Session
void SetTimesTo(time_t time);
void Clear(bool clear_plugin_data = true);
void ClearOnEndRequest();
// 0 - means that there is a temporary session
@@ -50,7 +52,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 +80,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;
};
+77 -6
View File
@@ -2,7 +2,7 @@
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2008-2012, Tomasz Sowa
* Copyright (c) 2008-2013, Tomasz Sowa
* All rights reserved.
*
*/
@@ -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()
{
@@ -84,7 +89,7 @@ long id;
{
if( sizeof(long) == 8 )
{
id = ((unsigned long)std::rand()) << 32 + std::rand();
id = (((unsigned long)std::rand()) << 32) + std::rand();
}
else
{
@@ -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,34 @@ 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);
}
void SessionManager::RemoveIPBan(int ip)
{
ban_tab.RemoveIP(ip);
}
void SessionManager::ClearIPBanList()
{
ban_tab.Clear();
}
/*
@@ -437,6 +496,7 @@ SessionContainer::Iterator i;
{
Lock();
CheckWheterIPListIsSorted();
CheckSession(i);
exit = synchro->was_stop_signal;
@@ -445,6 +505,17 @@ SessionContainer::Iterator i;
}
// objects locked
void SessionManager::CheckWheterIPListIsSorted()
{
if( !ban_tab.IsSorted() )
{
log << log4 << "SM: sorting the ban list" << logend;
ban_tab.Sort();
}
}
// it's called from the other thread (with Lock and Unlock)
void SessionManager::CheckSession(SessionContainer::Iterator & i)
{
+14 -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,12 @@ public:
size_t Size();
size_t MarkAllSessionsToRemove(long user_id);
IPBan & AddIPToBanList(int ip);
size_t BanListSize();
IPBan & GetIPBan(size_t index);
void RemoveIPBan(int ip);
void ClearIPBanList();
private:
Config * config;
@@ -68,6 +77,9 @@ private:
Session * session;
SessionContainer session_tab;
IPBanContainer ban_tab;
IPBan * current_ip_ban;
// session with id 0
Session temporary_session;
@@ -77,7 +89,7 @@ private:
long CreateSessionId();
void CreateSession();
bool SetSessionFromCookie(const std::string & cookie);
void SetTemporarySession();
// second thread
int deleted;
@@ -85,6 +97,7 @@ private:
void CheckSession(SessionContainer::Iterator & i);
bool IsSessionOutdated(const Session & s) const;
void DeleteSession(Session * del_session);
void CheckWheterIPListIsSorted();
};
+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;
+62 -11
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;
@@ -151,7 +150,7 @@ bool ssl = false;
/*
postfix will not be UrlEncoded
*/
void System::RedirectTo(const Item & item, const wchar_t * postfix)
void System::RedirectTo(const Item & item, const wchar_t * postfix, bool use_reqtype)
{
PutUrlProto(config->use_ssl, cur->request->redirect_to);
@@ -177,6 +176,12 @@ void System::RedirectTo(const Item & item, const wchar_t * postfix)
if( postfix )
cur->request->redirect_to += postfix;
if( use_reqtype && cur->request->IsParam(L"reqtype") )
{
cur->request->redirect_to += L"/-/reqtype:";
cur->request->redirect_to += cur->request->ParamValue(L"reqtype");
}
}
@@ -184,7 +189,7 @@ void System::RedirectTo(const Item & item, const wchar_t * postfix)
/*
postfix will not be UrlEncoded
*/
void System::RedirectTo(long item_id, const wchar_t * postfix)
void System::RedirectTo(long item_id, const wchar_t * postfix, bool use_reqtype)
{
PutUrlProto(config->use_ssl, cur->request->redirect_to);
@@ -225,6 +230,12 @@ void System::RedirectTo(long item_id, const wchar_t * postfix)
if( postfix )
cur->request->redirect_to += postfix;
if( use_reqtype && cur->request->IsParam(L"reqtype") )
{
cur->request->redirect_to += L"/-/reqtype:";
cur->request->redirect_to += cur->request->ParamValue(L"reqtype");
}
}
@@ -232,7 +243,7 @@ void System::RedirectTo(long item_id, const wchar_t * postfix)
/*
url will not be UrlEncoded
*/
void System::RedirectTo(const wchar_t * url)
void System::RedirectTo(const wchar_t * url, bool use_reqtype)
{
PutUrlProto(config->use_ssl, cur->request->redirect_to);
@@ -263,15 +274,21 @@ void System::RedirectTo(const wchar_t * url)
cur->request->redirect_to += url;
}
}
if( use_reqtype && cur->request->IsParam(L"reqtype") )
{
cur->request->redirect_to += L"/-/reqtype:";
cur->request->redirect_to += cur->request->ParamValue(L"reqtype");
}
}
/*
url will not be UrlEncoded
*/
void System::RedirectTo(const std::wstring & url)
void System::RedirectTo(const std::wstring & url, bool use_reqtype)
{
RedirectTo(url.c_str());
RedirectTo(url.c_str(), use_reqtype);
}
@@ -325,20 +342,54 @@ void System::RedirectWithFunctionAndParamsTo(const std::wstring & url)
}
void System::RedirectToLastDir()
void System::RedirectToLastDir(const wchar_t * postfix, bool use_reqtype)
{
if( !cur->request->dir_tab.empty() )
RedirectTo( *cur->request->dir_tab.back() );
RedirectTo( *cur->request->dir_tab.back(), postfix, use_reqtype);
}
void System::RedirectToLastItem()
void System::RedirectToLastItem(const wchar_t * postfix, bool use_reqtype)
{
if( cur->request->last_item )
RedirectTo( *cur->request->last_item );
RedirectTo( *cur->request->last_item, postfix, use_reqtype );
}
void System::RedirectToLastFunction(const wchar_t * postfix, bool use_reqtype)
{
RedirectToLastDir(0, false);
TrimLast(cur->request->redirect_to, '/');
if( cur->request->is_item )
{
cur->request->redirect_to += '/';
cur->request->redirect_to += cur->request->item.url;
}
if( cur->request->function )
{
cur->request->redirect_to += '/';
cur->request->redirect_to += cur->request->function->fun.url;
}
if( postfix )
{
cur->request->redirect_to += '/';
cur->request->redirect_to += postfix;
}
if( use_reqtype && cur->request->IsParam(L"reqtype") )
{
if( !cur->request->function && !postfix )
cur->request->redirect_to += L"/-";
cur->request->redirect_to += L"/reqtype:";
cur->request->redirect_to += cur->request->ParamValue(L"reqtype");
}
}
bool System::CanChangeUser(const Item & item, long new_user_id)
{
+8 -6
View File
@@ -90,14 +90,16 @@ public:
void AddParams(const ParamTab & param_tab, std::wstring & str, bool clear_str = true);
void PutUrlProto(bool can_use_ssl, std::wstring & str, bool clear_str = true);
void RedirectTo(const Item & item, const wchar_t * postfix = 0);
void RedirectTo(long item_id, const wchar_t * postfix = 0);
void RedirectTo(const wchar_t * url);
void RedirectTo(const std::wstring & url);
void RedirectTo(const Item & item, const wchar_t * postfix = 0, bool use_reqtype = true);
void RedirectTo(long item_id, const wchar_t * postfix = 0, bool use_reqtype = true);
void RedirectTo(const wchar_t * url, bool use_reqtype = true);
void RedirectTo(const std::wstring & url, bool use_reqtype = true);
void RedirectWithFunctionAndParamsTo(const wchar_t * url);
void RedirectWithFunctionAndParamsTo(const std::wstring & url);
void RedirectToLastDir();
void RedirectToLastItem(); // redirect to an item if exists or to the last directory
void RedirectToLastDir(const wchar_t * postfix = 0, bool use_reqtype = true);
void RedirectToLastItem(const wchar_t * postfix = 0, bool use_reqtype = true); // redirect to an item if exists or to the last directory
void RedirectToLastFunction(const wchar_t * postfix = 0, bool use_reqtype = true);
bool CanChangeUser(const Item & item, long new_user_id);
bool CanChangeGroup(const Item & item, long new_group_id);
+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
+2 -2
View File
@@ -2,7 +2,7 @@
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2008-2012, Tomasz Sowa
* Copyright (c) 2008-2013, Tomasz Sowa
* All rights reserved.
*
*/
@@ -13,7 +13,7 @@
#define WINIX_VER_MAJOR 0
#define WINIX_VER_MINOR 5
#define WINIX_VER_REVISION 0
#define WINIX_VER_REVISION 3
#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
+20 -5
View File
@@ -311,7 +311,7 @@ Error Db::AddItemIntoItem(Item & item)
query.Clear();
query << R("insert into core.item (user_id, modification_user_id, group_id, privileges, "
"date_creation, date_modification, type, parent_id, content_id, "
"link_to, link_redirect, subject, guest_name, template, sort_index, meta, url) values (")
"link_to, link_redirect, subject, guest_name, template, sort_index, meta, ameta, url) values (")
<< item.user_id
<< item.modification_user_id
<< item.group_id
@@ -327,7 +327,8 @@ Error Db::AddItemIntoItem(Item & item)
<< item.guest_name
<< item.html_template
<< item.sort_index
<< item.meta;
<< item.meta
<< item.ameta;
url_without_id = AddItemCreateUrlSubject(item);
@@ -469,7 +470,7 @@ Error Db::EditItemInItem(Item & item, bool with_url)
query.Clear();
query << R("update core.item set (user_id, modification_user_id, group_id, privileges, "
"date_creation, date_modification, type, link_to, link_redirect, parent_id, subject, "
"guest_name, template, sort_index, meta");
"guest_name, template, sort_index, meta, ameta");
if( with_url )
query << R(", url");
@@ -489,7 +490,8 @@ Error Db::EditItemInItem(Item & item, bool with_url)
<< item.guest_name
<< item.html_template
<< item.sort_index
<< item.meta;
<< item.meta
<< item.ameta;
if( with_url )
{
@@ -771,7 +773,7 @@ void Db::GetItemsQuerySelect(const DbItemQuery & iq, DbTextStream & query, bool
if( iq.sel_file ) query << R(", file_path, file_fs, file_type, has_thumb, hash, hash_type, file_size");
if( iq.sel_html_template ) query << R(", template");
if( iq.sel_sort_index ) query << R(", sort_index");
if( iq.sel_meta ) query << R(", meta");
if( iq.sel_meta ) query << R(", meta, ameta");
}
query << R(" from core.item");
@@ -1343,6 +1345,19 @@ return DoCommand(query);
}
Error Db::EditAdminMetaById(const PT::Space & ameta, long id)
{
query.Clear();
query << R("update core.item set (ameta) = (")
<< ameta
<< R(") where id=")
<< id
<< R(";");
return DoCommand(query);
}
Error Db::EditSubjectById(Item & item, long id)
+1
View File
@@ -72,6 +72,7 @@ public:
Error EditFileById(const Item & item, long id); // file_path, file_fs, file_type
Error EditHasThumbById(bool has_thumb, long id);
Error EditMetaById(const PT::Space & meta, long id);
Error EditAdminMetaById(const PT::Space & meta, long id);
Error DelDirById(long id);
Error DelFileById(long file_id);
+1 -1
View File
@@ -76,7 +76,7 @@ void DbConn::WaitForConnection()
{
if( !pg_conn || PQstatus(pg_conn) != CONNECTION_OK )
{
log << log3 << "Db: waiting for the db to be ready...." << logend;
log << log3 << "Db: waiting for the db to be ready...." << logend << logsave;
while( !AssertConnection(false, false) )
sleep(5);
+3 -1
View File
@@ -46,6 +46,7 @@ void DbItemColumns::SetColumns(PGresult * r)
modify_index = PQfnumber(r, "modify_index");
sort_index = PQfnumber(r, "sort_index");
meta = PQfnumber(r, "meta");
ameta = PQfnumber(r, "ameta");
}
@@ -82,7 +83,8 @@ void DbItemColumns::SetItem(PGresult * r, long row, Item & item)
if( html_template != -1 ) DbBase::AssertValueWide(r, row, html_template, item.html_template);
if( sort_index != -1 ) item.sort_index = DbBase::AssertValueInt(r, row, sort_index);
if( meta != -1 ) db_base.AssertValueSpace(r, row, meta, item.meta);
if( meta != -1 ) db_base.AssertValueSpace(r, row, meta, item.meta);
if( ameta != -1 ) db_base.AssertValueSpace(r, row, ameta, item.ameta);
}
+1
View File
@@ -48,6 +48,7 @@ struct DbItemColumns
int modify_index;
int sort_index;
int meta;
int ameta;
DbItemColumns(DbBase & db_base_) : db_base(db_base_)
{
+1 -1
View File
@@ -33,7 +33,7 @@ struct DbItemQuery
bool sel_file; // file_path, file_fs, file_type, has_thumb, hash, hash_type, file_size
bool sel_html_template; // template
bool sel_sort_index; // sort_index
bool sel_meta; // meta PT::Space
bool sel_meta; // meta and ameta (PT::Space)
bool where_id; //
bool where_parent_id; //
+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;
}
+13 -8
View File
@@ -54,7 +54,7 @@ return (conf_parser.ParseString(env_str) == PT::SpaceParser::ok);
}
bool Env::EditAdminEnv(long user_id, const std::wstring & env_str)
bool Env::EditAdminEnv(long user_id, const std::wstring & env_str, bool use_ses_log)
{
if( Parse(env_str) )
{
@@ -69,21 +69,23 @@ bool Env::EditAdminEnv(long user_id, const std::wstring & env_str)
}
else
{
log << log1 << "Evn: a problem with changing environment variables for user: "
log << log1 << "Evn: a database problem with changing environment variables for user: "
<< cur->session->puser->name << ", id: " << cur->session->puser->id << logend;
}
}
else
{
log << log2 << "Env: Syntax error in line: " << conf_parser.line << logend;
slog << logerror << "Syntax error in line: " << conf_parser.line << logend;
if( use_ses_log )
slog << logerror << T("syntax_error_in_line") << ' ' << conf_parser.line << logend;
}
return false;
}
bool Env::EditEnv(long user_id, const std::wstring & env_str)
bool Env::EditEnv(long user_id, const std::wstring & env_str, bool use_ses_log)
{
if( Parse(env_str) )
{
@@ -98,20 +100,23 @@ bool Env::EditEnv(long user_id, const std::wstring & env_str)
}
else
{
log << log1 << "Evn: a problem with changing admin environment variables for user: "
log << log1 << "Evn: a database problem with changing admin environment variables for user: "
<< cur->session->puser->name << ", id: " << cur->session->puser->id << logend;
}
}
else
{
log << log2 << "Env: Syntax error in line: " << conf_parser.line << logend;
slog << logerror << "Syntax error in line: " << conf_parser.line << logend;
if( use_ses_log )
slog << logerror << T("syntax_error_in_line") << ' ' << conf_parser.line << logend;
}
return false;
}
void Env::SaveEnv()
{
if( GetUser() )
@@ -123,11 +128,11 @@ void Env::SaveEnv()
if( cur->request->IsParam(L"a") )
{
if( cur->session->puser->super_user )
status = EditAdminEnv(user_id, env_str);
status = EditAdminEnv(user_id, env_str, true);
}
else
{
status = EditEnv(user_id, env_str);
status = EditEnv(user_id, env_str, true);
}
if( status )
+2 -2
View File
@@ -24,8 +24,8 @@ public:
Env();
bool EditAdminEnv(long user_id, const std::wstring & env_str);
bool EditEnv(long user_id, const std::wstring & env_str);
bool EditAdminEnv(long user_id, const std::wstring & env_str, bool use_ses_log = false);
bool EditEnv(long user_id, const std::wstring & env_str, bool use_ses_log = false);
bool HasAccess();
void MakePost();
+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;
+73
View File
@@ -0,0 +1,73 @@
/*
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2012, Tomasz Sowa
* All rights reserved.
*
*/
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include "ipban.h"
#include "functions.h"
#include "core/sessionmanager.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()
{
if( cur->request->IsParam(L"removeip") )
{
if( cur->request->ParamValue(L"removeip") == L"all" )
{
session_manager->ClearIPBanList();
cur->session->ip_ban = 0;
}
else
{
int cur_ip = 0;
if( cur->session->ip_ban )
cur_ip = cur->session->ip_ban->ip;
AssignString(cur->request->ParamValue(L"removeip"), tmp_ip_str);
int ip = (int)inet_addr(tmp_ip_str.c_str());
session_manager->RemoveIPBan(ip);
if( cur->session->ip_ban && cur_ip == ip )
cur->session->ip_ban = 0;
}
system->RedirectToLastFunction();
}
}
} // namespace
+40
View File
@@ -0,0 +1,40 @@
/*
* 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();
private:
std::string tmp_ip_str;
};
} // namespace
#endif
+153 -7
View File
@@ -7,6 +7,7 @@
*
*/
#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,160 @@ return result;
}
bool Login::LoginUser(const std::wstring & login, const std::wstring & password, bool remember_me, bool use_ses_log)
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;
}
// if you are logging not from a webbrowser but from an application
// then probably you need check_abuse to be false
bool Login::LoginUser(const std::wstring & login, const std::wstring & password, bool remember_me,
bool use_ses_log, bool check_abuse)
{
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( check_abuse && !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;
@@ -124,11 +267,14 @@ void Login::MakePost()
const std::wstring & pass = cur->request->PostVar(L"password");
const std::wstring & remem = cur->request->PostVar(L"rememberme");
if( LoginUser(login, pass, !remem.empty(), true) )
if( LoginUser(login, pass, !remem.empty(), true, true) )
system->RedirectToLastItem();
}
void Login::MakeGet()
{
}
} // namespace
+16 -2
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,19 +24,33 @@ 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);
bool LoginUser(const std::wstring & login, const std::wstring & password, bool remember_me,
bool use_ses_log = false, bool check_abuse = false);
private:
void ClearTmpStruct();
bool CheckPasswords(const std::wstring & password);
void AddBanInfo();
bool CheckAbuse();
UserPass up, up2;
std::string pass_decrypted;
std::wstring pass_hashed;
std::wstring salt;
};
+78 -12
View File
@@ -17,30 +17,53 @@ namespace Fun
Meta::Meta()
{
fun.url = L"meta";
// !! CHECKME what about follow symlinks?
}
bool Meta::HasAccess()
{
return system->HasReadAccess(*cur->request->last_item);
if( cur->request->IsParam(L"a") )
return cur->session->puser && cur->session->puser->super_user;
else
return system->HasWriteAccess(*cur->request->last_item);
}
bool Meta::AddMetaInfo(Item & item, const std::wstring & meta_str)
bool Meta::Parse(const std::wstring & meta_str)
{
space.Clear();
conf_parser.SetSpace(space);
conf_parser.UTF8(config->utf8);
conf_parser.SplitSingle(true);
if( conf_parser.ParseString(meta_str) == PT::SpaceParser::ok )
return (conf_parser.ParseString(meta_str) == PT::SpaceParser::ok);
}
bool Meta::EditAdminMeta(long item_id, const std::wstring & meta_str, bool use_ses_log)
{
if( Parse(meta_str) )
{
if( db->EditMetaById(space, item.id) == WINIX_ERR_OK )
if( db->EditAdminMetaById(space, item_id) == WINIX_ERR_OK )
{
item.meta = space;
return true;
}
else
{
log << log1 << "Meta: a database problem with changing admin meta information for item id: "
<< item_id << logend;
}
}
else
{
log << log2 << "Meta: Syntax error in line: " << conf_parser.line << logend;
if( use_ses_log )
slog << logerror << T("syntax_error_in_line") << ' ' << conf_parser.line << logend;
}
return false;
@@ -48,21 +71,64 @@ return false;
void Meta::MakePost()
bool Meta::EditMeta(long item_id, const std::wstring & meta_str, bool use_ses_log)
{
if( Parse(meta_str) )
{
if( db->EditMetaById(space, item_id) == WINIX_ERR_OK )
{
return true;
}
else
{
log << log1 << "Meta: a database problem with changing meta information for item id: "
<< item_id << logend;
}
}
else
{
log << log2 << "Meta: Syntax error in line: " << conf_parser.line << logend;
if( use_ses_log )
slog << logerror << T("syntax_error_in_line") << ' ' << conf_parser.line << logend;
}
return false;
}
void Meta::ChangeAdminMeta()
{
if( cur->session->puser && cur->session->puser->super_user )
{
const std::wstring & meta_str = cur->request->PostVar(L"itemmeta");
if( EditAdminMeta(cur->request->last_item->id, meta_str, true) )
system->RedirectToLastItem();
}
}
void Meta::ChangeMeta()
{
if( system->HasWriteAccess(*cur->request->last_item) )
{
const std::wstring & meta_str = cur->request->PostVar(L"itemmeta");
if( AddMetaInfo(*cur->request->last_item, meta_str) )
if( EditMeta(cur->request->last_item->id, meta_str, true) )
system->RedirectToLastItem();
else
slog << logerror << "Syntax error in line: " << conf_parser.line << logend;
}
}
void Meta::MakePost()
{
if( cur->request->IsParam(L"a") )
ChangeAdminMeta();
else
{
cur->request->status = WINIX_ERR_PERMISSION_DENIED;
}
ChangeMeta();
}
+8 -1
View File
@@ -26,12 +26,19 @@ public:
bool HasAccess();
void MakePost();
bool AddMetaInfo(Item & item, const std::wstring & meta_str);
bool EditAdminMeta(long item_id, const std::wstring & meta_str, bool use_ses_log = false);
bool EditMeta(long item_id, const std::wstring & meta_str, bool use_ses_log = false);
private:
PT::SpaceParser conf_parser;
PT::Space space;
bool Parse(const std::wstring & meta_str);
void ChangeAdminMeta();
void ChangeMeta();
};
+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>
+35 -23
View File
@@ -1,33 +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]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]">
<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-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">
@@ -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]">
<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" 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_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>
+22 -14
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]">
<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">{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>
[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>
+86
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]
@@ -44,6 +46,50 @@
[end]
[if gallery_mount_type_arg_is "galleria1.2.9"]
[if gallery_tab]
<ul class="galleryimages" style="width: [gallery_width]; height: [gallery_height];">
[for gallery_tab]
<li><a href="[gallery_tab_link]"><img src="[gallery_tab_link]/-/thumb" alt="[gallery_tab_subject]"></a></li>
[end]
</ul>
[if gallery_mount_theme_arg_is "transparent"]
<script type="text/javascript">Galleria.loadTheme('[doc_base_url_common]/galleria/themes/transparent/galleria.transparent.js');</script>
[if-no winix_function_param_is "image"]
<script type="text/javascript">Galleria.configure(\{showInfo:false\}); Galleria.run('.galleryimages');</script>
[else]
<script type="text/javascript">Galleria.configure(\{showInfo:false, show: [winix_function_param_value "image"]\}); Galleria.run('.galleryimages');</script>
[end]
[else]
[if gallery_mount_theme_arg_is "transparentinfo"]
<script type="text/javascript">Galleria.loadTheme('[doc_base_url_common]/galleria/themes/transparentinfo/galleria.transparent.js');</script>
[if-no winix_function_param_is "image"]
<script type="text/javascript">Galleria.configure(\{\}); Galleria.run('.galleryimages');</script>
[else]
<script type="text/javascript">Galleria.configure(\{show: [winix_function_param_value "image"]\}); Galleria.run('.galleryimages');</script>
[end]
[else]
<script type="text/javascript">Galleria.loadTheme('[doc_base_url_common]/galleria/themes/classic/galleria.classic.js');</script>
[if-no winix_function_param_is "image"]
<script type="text/javascript">Galleria.configure(\{\}); Galleria.run('.galleryimages');</script>
[else]
<script type="text/javascript">Galleria.configure(\{show: [winix_function_param_value "image"]\}); Galleria.run('.galleryimages');</script>
[end]
[end]
[end]
[end]
[end]
[if gallery_mount_type_arg_is "galleriathumb"]
@@ -77,3 +123,43 @@
[end]
[if gallery_mount_type_arg_is "galleriathumb1.2.9"]
[if-no winix_function_param_is "image"]
[if gallery_tab]
<ul class="galleryimages">
[for gallery_tab]
<li><a href="[doc_base_url][dir]-/image:[gallery_tab_index]"><img src="[gallery_tab_link]/-/thumb" alt="[gallery_tab_subject]"></a></li>
[end]
</ul>
[end]
[else]
[if gallery_tab]
<ul class="galleryimages" style="width: [gallery_width]; height: [gallery_height];">
[for gallery_tab]
<li><a href="[gallery_tab_link]"><img src="[gallery_tab_link]/-/thumb" alt="[gallery_tab_subject]"></a></li>
[end]
</ul>
[if gallery_mount_theme_arg_is "transparent"]
<script type="text/javascript">Galleria.loadTheme('[doc_base_url_common]/galleria/themes/transparent/galleria.transparent.js');</script>
<script type="text/javascript">Galleria.configure(\{showInfo:false, show: [winix_function_param_value "image"]\}); Galleria.run('.galleryimages');</script>
[else]
[if gallery_mount_theme_arg_is "transparentinfo"]
<script type="text/javascript">Galleria.loadTheme('[doc_base_url_common]/galleria/themes/transparentinfo/galleria.transparent.js');</script>
<script type="text/javascript">Galleria.configure(\{show: [winix_function_param_value "image"]\}); Galleria.run('.galleryimages');</script>
[end]
[end]
[end]
[end]
[end]
</div>
+47
View File
@@ -0,0 +1,47 @@
<div class="winix">
<h1>{ipban_header}</h1>
[if ipban_tab]
<table>
<tr>
<th>{ipban_col_id}</th>
<th>{ipban_col_ip_address}</th>
<th>{ipban_col_login_failures}</th>
<th>{ipban_col_login_allowed}</th>
<th>{ipban_col_ban_level}</th>
<th>{ipban_col_active_flag}</th>
<th>{ipban_col_last_used}</th>
<th>{ipban_col_expires}</th>
<th>{ipban_col_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]{ipban_loggin_allowed}[else]{ipban_loggin_not_allowed}[end]</td>
<td>[ipban_tab_ban_level]</td>
<td>[if ipban_tab_has_active_flag]{ipban_has_active_flag}[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]">{ipban_remove_ip}</a></td>
</tr>
[end]
</table>
<p>
<a href="[doc_base_url][dir][if item_is][item_url]/[end]ipban/removeip:all">{ipban_remove_all_ip}</a>
</p>
[else]
<p>{ipban_ban_list_empty}</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>
+48 -23
View File
@@ -1,10 +1,40 @@
<h1>{meta_header}</h1>
<div class="winix">
[if winix_function_param_is "a"]
<h1>{meta_admin_header}</h1>
[if item_is]
<form method="post" action="[doc_base_url][dir][item_url]/meta/a">
<textarea class="multitext" rows="30" cols="60" name="itemmeta">[item_admin_meta_str]</textarea>
<input class="submit" type="submit" value="{change}">
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
</form>
[else]
<form method="post" action="[doc_base_url][dir]meta/a">
<textarea class="multitext" rows="30" cols="60" name="itemmeta">[dir_last_admin_meta_str]</textarea>
<input class="submit" type="submit" value="{change}">
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
</form>
[end]
[else]
<h1>{meta_header}</h1>
[if item_is]
<form method="post" action="[doc_base_url][dir][item_url]/meta">
[if item_is]
[if item_can_write]
<form id="additem" method="post" action="[doc_base_url][dir][item_url]/meta">
<fieldset>
<legend>{form_meta_legend}</legend>
<textarea class="multitext" rows="30" cols="60" name="itemmeta">[item_meta_str]</textarea>
<input class="submit" type="submit" value="{change}">
@@ -12,26 +42,21 @@
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
</fieldset>
</form>
[else]
<pre>[item_meta_str]</pre>
[end]
[else]
[if dir_can_write]
<form id="additem" method="post" action="[doc_base_url][dir]meta">
<fieldset>
<legend>{form_meta_legend}</legend>
<textarea class="multitext" rows="30" cols="60" name="itemmeta">[dir_last_meta_str]</textarea>
<input class="submit" type="submit" value="{change}">
<form method="post" action="[doc_base_url][dir]meta">
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
<textarea class="multitext" rows="30" cols="60" name="itemmeta">[dir_last_meta_str]</textarea>
<input class="submit" type="submit" value="{change}">
</fieldset>
</form>
[else]
<pre>[dir_last_meta_str]</pre>
[if winix_function_param_is "postredirect"]
<input type="hidden" name="postredirect" value="[winix_function_param_value "postredirect"]">
[end]
</form>
[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>

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