added: config options:
// whether or not we should encode the session cookie
// (we have a special algorithm)
// default: false
bool session_cookie_encode;
// if session_cookie_encode is true then you should provide
// a file where AES keys will be stored
std::wstring session_keys_file;
// each session has an index -- an unsigned int value
// this value is sent in the cookie string (is encoded)
// and is incremented when session_index_time_increment time is passed since the last incrementing
// if a client sent the cookie back the difference between
// current index and the index in the cookie should be less than or equal to session_allow_index_difference
// default: 8
size_t session_allow_index_difference;
// the time which should pass after the session index is incremented
// default: 30
// (session_allow_index_difference + 1) * session_index_time_increment should be less than a time
// load of a page and all elements on it such as images (of course it depends on client's download too)
time_t session_index_time_increment;
// time in seconds after a new AES key pair should be generated
// we have 256 pairs of keys so this time multiplied by 256 should not be less than
// the max time of a session (session_remember_max_idle),
// by default: 256 * 2 days = 512 days = 1.4 year > 3 months (session_remember_max_idle)
// default: 172800 = 2 days (max: 2678400 = 1 month, min: 10)
size_t session_key_renew_time;
changed: when printing the time of a request we print only two non-zero digits
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@994 e52654a7-88a9-db11-a3e9-0013d4bc506e
removed statements: [if-index ...] [is ...] [is-no ...]
added: generic ezc functions:
and, any (the same as and), or, one (the same as or), not, cmp, trim
to_lower, to_upper, index
changed: in misc:
added treat_new_line_as_white flag to IsWhite() SkipWhite() and TrimWhite()
TrimWhite(), TrimFirst(), TrimLast(), Trim() are using only wide characters now
(they were templates before)
added: IsInt(), IsSize(), IsFloat()
changed: version to 0.6.4
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@989 e52654a7-88a9-db11-a3e9-0013d4bc506e
everywhere we are using std::wstring and wchar_t*
(std::string and char* is used only locally in some places
especially when creating a path to OS file system etc.)
added: to the special thread when winix closes:
a write function for curl: FetchPageOnExitCurlCallback()
without this function the curl library will print
the page's content to the standart output
changed: TextStream<> class from core can make
UTF8<->wide strings conversions
removed: from config: utf8 option
now winix expects UTF8 from the user's input (html forms, url-es)
and outputs strings in the UTF8 format
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@965 e52654a7-88a9-db11-a3e9-0013d4bc506e
added: to config: upload_group
a group name for newly uploaded files (and created necessary directories in the file system)
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@961 e52654a7-88a9-db11-a3e9-0013d4bc506e
index_rawcontent.html, index_ajaxcontent.html
now we have out_streams in Request and some special
keyword in ezc templates for sending content to the
specified streams
changed: the way how winix answers to the client's browsers:
info from Request class:
winix answer send to the client's browser
|
|
depending on send_bin_stream
-------------------------------------------------
| |
text answer binary answer
| |
depending on return_json sending out_bin_stream
------------------------------------
| |
normal request ajax request
| |
sending out_streams[0] depending on return_info_only
------------------------------------------------------
| |
generating JSON object from: generating JSON object only from info
out_streams and info, e.g.: e.g.:
{ { info object serialized here }
"stream_1": "some html content",
"stream_2": "some other html content",
"info": { info object serialized here }
}
note that out_streams[0] is not sent
in JSON answers
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@937 e52654a7-88a9-db11-a3e9-0013d4bc506e
for cropping images (and thumbnails)
www.domain.com/dir/file.jpg/imgcrop -- crop an image
www.domain.com/dir/file.jpg/imgcrop/thumb -- crop an image's thumbnail
www.domain.com/dir/file.jpg/imgcrop/newthumb -- crop and create a new thumbnail (from an original image)
www.domain.com/dir/imgcrop -- show images' list with above options
added: to Image class: some methods for cropping
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@919 e52654a7-88a9-db11-a3e9-0013d4bc506e
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
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
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
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
added: to misc: QEncode which takes PT::TextStreamBase as an argument
added: to Locale: methods: IsKey, Get which takes PT::TextStreamBase as an argument
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@860 e52654a7-88a9-db11-a3e9-0013d4bc506e
std::wstring * PostVarp(const std::wstring & var);
added: to misc:
template<class CharType>
bool Toa(unsigned/signed long/int value, CharType * buffer);
some Toa methods which don't get the buffer len
(the buffer has to be sufficient big)
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@845 e52654a7-88a9-db11-a3e9-0013d4bc506e
added: notifications for resetting a user's password
(there is no a winix function for this yet)
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@817 e52654a7-88a9-db11-a3e9-0013d4bc506e
UrlEncode() for char->wstring
UrlEncode() for wstring->wstring
removed: Request::redirect_url_encoded flag
the Request::redirect_to string should always be url-encoded
changed: in UrnEncode()
now characters like '#' and '/' are not allowed in an url
(will be url-encoded)
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@807 e52654a7-88a9-db11-a3e9-0013d4bc506e
void MaxSize(StringType & str, size_t max_size)
if a string is larger than max_size then it is truncated to max_size characters
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@805 e52654a7-88a9-db11-a3e9-0013d4bc506e
then current iterators (and pointers) were invalidated
now we are using std::vector<Type*>
this caused some crashes when a new user was added by 'adduser' winix function
added: plugin 'export' is able to upload files on a remote server now
(not finished yet)
changed: Thumb class is now called: Image
and we are able to resize images too
(some new options in the config and in mount points)
added: some new plugin messages
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@764 e52654a7-88a9-db11-a3e9-0013d4bc506e
fixed: System::FollowAllLinks didn't check permissions to a file (only to a simlink or a directory)
added: new ezc function: insert_page
now we are able to nest pages in pages
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@750 e52654a7-88a9-db11-a3e9-0013d4bc506e
we're using an jquery upload plugin
added: Item struct has new rows: hash, hash_type, file_size, sort_index
added: css mount parameter
you can specify css files there, and javascript wysiwyg editors
(ckeditor, tinymce) can make use of it
changed: post parsers can parse post variables with the same name
(a postfix is added in such a case)
added: common_dir parameter to the config
this is a path to common directory (directory with common static files)
it is needed to the 'css' mount parameter
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@746 e52654a7-88a9-db11-a3e9-0013d4bc506e
some path in winix can be redirected to a specified static directory
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@738 e52654a7-88a9-db11-a3e9-0013d4bc506e
we have there two pointers:
Request * request;
Session * session;
these are the current request and the current session
the session GC was moved to SessionManager (was in SessionContainer)
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@708 e52654a7-88a9-db11-a3e9-0013d4bc506e
added winix functions: ln
winix function 'default' can be used without redirecting now
added new tickets types: TypeProgress, TypeString, TypeMultistring, TypeImages, TypeFiles
now tickets are combined with files
added winix functions: showtickets
fixed mountpoints:
when the default root mount was created its parameter table was empty
and it caused accessing to a non-existing objects
fixed logger:
modifiers (log1, log2, log3) were incorrectly treated
added modifier: log4 (debug info)
now we are moving threads to a new plugin 'thread'
created directory: plugins/thread
(not finished yet)
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@704 e52654a7-88a9-db11-a3e9-0013d4bc506e
removed: item.auth item.auth_path
added: item.file_path, item.file_fs, item.file_type
now the path to a static file is a relative path
added: thumbnails (not finished yet)
fixed: db didn't correctly return the number of deleted items /DelItem() method/
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@696 e52654a7-88a9-db11-a3e9-0013d4bc506e
changed: functions for text/numbers conversions
int Toi(const std::string & str, int base = 10);
int Toi(const std::wstring & str, int base = 10);
int Toi(const char * str, int base = 10);
int Toi(const wchar_t * str, int base = 10);
long Tol(const std::string & str, int base = 10);
long Tol(const std::wstring & str, int base = 10);
long Tol(const char * str, int base = 10);
long Tol(const wchar_t * str, int base = 10);
template<class CharType>
bool Toa(unsigned long value, CharType * buffer, size_t buf_len, int base = 10);
template<class CharType>
bool Toa(long value, CharType * buffer, size_t buf_len, int base = 10);
template<class CharType>
bool Toa(unsigned int value, CharType * buffer, size_t buf_len, int base = 10);
template<class CharType>
bool Toa(int value, CharType * buffer, size_t buf_len, int base = 10);
const wchar_t * Toa(unsigned int value, int base = 10);
const wchar_t * Toa(unsigned long value, int base = 10);
const wchar_t * Toa(int value, int base = 10);
const wchar_t * Toa(long value, int base = 10);
void Toa(int value, std::string & res, int base = 10, bool clear = true);
void Toa(long value, std::string & res, int base = 10, bool clear = true);
void Toa(int value, std::wstring & res, int base = 10, bool clear = true);
void Toa(long value, std::wstring & res, int base = 10, bool clear = true);
added: HtmlTextStream class (files htmltextstream.cpp htmltextstream.h in templates)
this is a special stream for automatically escaping html tags
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@682 e52654a7-88a9-db11-a3e9-0013d4bc506e
so sometimes the time of the dir was changed
now for converting tm into time_t use:
time_t Time(const tm & par);
time_t Time(const tm * par);
tm Time(time_t par);
from core/misc.h
now winix internally use GMT time
only when printing it is converted to local user time
temporarily all users use the same local time (config: time_zone_offset)
(only logs are genereted with local system time)
added to system:
time_t LocalTime(time_t gmt_time);
tm LocalTime(const tm * ptm);
tm LocalTime(const tm & ptm);
they convert GMT time to local user time
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@666 e52654a7-88a9-db11-a3e9-0013d4bc506e
columns: dir_id, param, value
we are able to build complicated tickets
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@664 e52654a7-88a9-db11-a3e9-0013d4bc506e
all your plugin functions can have signature either:
void my_function(PluginInfo & info); or
void my_function();
only the main Init should have:
extern "C" void Init(PluginFunction & info);
added: directory 'plugins' for plugins
added: 'stats' plugin
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@624 e52654a7-88a9-db11-a3e9-0013d4bc506e
we have two file systems now:
- simplefs - the files stored on the hard drive have the same structure as in the database (dir1/dir2/file)
- hashfs - files are stored in special directories
extented: the mountparser can read file system
added: function download
this is a default function for items which have static content
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@588 e52654a7-88a9-db11-a3e9-0013d4bc506e
added: 'static' directory with *.css and images
we have a default layout
moved: locale from data to templates
notification templates have its own locale object
added: reload function reloades locale now too
added: 'nice' form of item_info in templates
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@582 e52654a7-88a9-db11-a3e9-0013d4bc506e
select file type by the extension
param: multi
fixed: uptime function
it showed incorrect uptime time (minuts were badly calculated)
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@575 e52654a7-88a9-db11-a3e9-0013d4bc506e
changed: html templates are a part of winix now
and the user can provide special html templates for its site
added: locales
added: html templates are using HtmlFilter now (locales)
changed: now we have html templates for each language
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@560 e52654a7-88a9-db11-a3e9-0013d4bc506e
added functions: ticket, createticket, editticket
(there is no 'rm' function working for tickets yet)
changed: mount parser and mount points
now we have more parameters (arguments in parameters)
some refactoring in functions 'emacs' and 'mkdir'
git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@554 e52654a7-88a9-db11-a3e9-0013d4bc506e
added: cmslu can act as an authorizer (fast cgi authorize role)
added: Item::static_auth we can have additional static content on the file system
this content is authorized through cmslu (fastcgi authorizer mode)
changed: some changes in config
changed: the way how the www server is using cmslu
added new virtuals: static static_auth
changed: cmslu returns correct http headers (200, 404, 403)
changed: in cookie parser: we get the last cookie (if the server has more than one cookie with the same name)
git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@540 e52654a7-88a9-db11-a3e9-0013d4bc506e