Commit Graph

697 Commits

Author SHA1 Message Date
Tomasz Sowa 60fccea703 fixed: dots in url-es (now only one dot is available in the whole name and it cannot be only one dot ".")
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
2009-12-30 20:46:12 +00:00
Tomasz Sowa 118bf1fc65 added: exception for the Konqueror browser
it has a problem with deflate compression


git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@539 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-12-19 19:46:15 +00:00
Tomasz Sowa ce7ae3edd4 changed: notification times
git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@536 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-12-09 00:52:00 +00:00
Tomasz Sowa 717eb526fb * added: class HTMLFilter
files: htmlfilter.h htmlfilter.cpp
         this is an html filter used to make the html output looking better
         this is a very lightweight filter
         (without using any dynamic memory - some memory is allocated only at the beginning - in ctors)
         this filter has O(n) complexity over the whole html string
* added: antyspamming method
         if the POST request is sent too fast after the GET
         it is treated as a spam
         only for no logged users and only in 'emacs' and 'createthread' functions
       


git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@534 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-12-09 00:42:40 +00:00
Tomasz Sowa 9241fddb1e small changes in Makefile
now the binaries are in local 'bin' directory
(use make install)


git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@532 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-12-04 05:03:44 +00:00
Tomasz Sowa 2dff0bed72 changed: SessionParser::ReadLong() can read negative values
git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@531 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-11-21 00:08:08 +00:00
Tomasz Sowa 4827c116f0 added: 'remember me' flag when logging
added: the session file
       sessions can still be available between starting and stopping the cmslu system


git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@529 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-11-20 23:09:52 +00:00
Tomasz Sowa 848afac803 removed: hidden variable 'old_url' in emacs template
git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@527 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-11-18 01:58:38 +00:00
Tomasz Sowa 13b0204427 I have forgotten to add templates/rebus.cpp to the repository
git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@525 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-11-17 01:07:29 +00:00
Tomasz Sowa dc5f002de3 refactoring
git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@523 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-11-17 01:04:01 +00:00
Tomasz Sowa 2ca44ec361 added: Rebus
(when no logged user wants to send a message then he is asked a question)


git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@521 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-11-16 23:36:38 +00:00
Tomasz Sowa c62d48160a fixed: the core didn't test for special folder when system was running
(now mkdir addes correctly special folders)
added: function 'reload'
       param: 'templates' - reloading templates


git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@519 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-11-16 17:43:23 +00:00
Tomasz Sowa 9129f1b82a added: mount points are read from db: /etc/fstab
changed: mount points parser allows empty lines (with some white characters)


git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@518 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-11-15 23:55:11 +00:00
Tomasz Sowa 378cfc0c3d added: plugin mechanism
files: core/plugin.h core/plugin.cpp core/pluginmsg.h
added: directory 'main' with main.cpp (moved from 'core' directory)
changed: the way of building
       nearly everything is in cmslu.so
       only main() is in cmslu and is dynamically linked with cmslu.so



git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@516 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-11-13 20:40:11 +00:00
Tomasz Sowa 7db71d43e0 added: acceptbaseparser.h acceptbaseparser.cpp
class AcceptBaseParser for parsing http accept* headers
added: acceptencodingparser.h
       class AcceptEncodingParser for parsing HTTP_ACCEPT_ENCODING header
added: compresion only when HTTP_ACCEPT_ENCODING has 'deflate'
       and the browser is not the Internet Explorer


git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@515 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-10-08 17:59:10 +00:00
Tomasz Sowa 85b678a8fb added: notifications to users' emails
(core/notify.h core/notify.cpp)
       templatesnotify directory
       all notifications are managed by a second thread


git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@512 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-09-30 22:31:20 +00:00
Tomasz Sowa 9902ce2b78 added: support for output compression
git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@511 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-09-21 23:05:05 +00:00
Tomasz Sowa 394c7b22a2 changed: mount points
git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@508 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-06-07 22:17:07 +00:00
Tomasz Sowa f99c993d96 added: column 'guest_name' to 'item' table
used when user_id is -1
added: mount parameters: thread_with_info, thread_with_header
added: function rm can remove threads



git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@506 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-06-07 02:40:27 +00:00
Tomasz Sowa 1eb42446f8 added: forum
added: mount params can have arguments (in parentheses)
added: mount params: withheader, withinfo, restrictcreatethread, only_root_can_remove,
       can_use_emacs_on(level), can_use_mkdir_on(level), 
added: table Item has 'subject' column now
removed: column 'subject' from table Content




git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@505 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-06-05 20:29:06 +00:00
Tomasz Sowa 3d001e7458 added: macro APPPREPARE
void AppFunction(int code);



git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@503 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-05-21 19:27:16 +00:00
Tomasz Sowa 2dd3fc7df8 changed: the way of building
core.a content.a templates.a confparser.a have gone away
	 there is only: cmslu.a now (in the global directory 'cmslu')
changed: the way of building
         in Makefile(s) we dont longer use explicitly a variable 'o = file1.o file2.o...'
	 it was put into Makefile.o.dep and is generated automatically 
         when 'make depend' is invoked
changed: some #include "..." directives were put from *.h to *.cpp files
         fewer dependences


git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@501 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-04-21 20:50:55 +00:00
Tomasz Sowa f46677dfc0 added: mount points have parameters now
added: to the database: table 'thread'



git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@499 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-04-20 23:49:28 +00:00
Tomasz Sowa e94ccc86f8 fixed: a small problem in mountparser (it coused core dumped when there was a wrong mount point supplied)
fixed: 'default' funtion can take a directory now (there was an error early)


git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@497 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-04-20 21:10:31 +00:00
Tomasz Sowa e778903dab added: put info about logging out a user (to 'last' table) (when a session expires)
git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@496 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-04-20 20:22:35 +00:00
Tomasz Sowa a1ea298a43 added: mount points
(reading /etc/fstab from db not working yet)
       core/mount.h
       core/mountparser.h
       core/mountparser.cpp
       core/mounts.h
       core/mounts.cpp
       content/thread.cpp
       content/createthread.cpp
       templates/thread.cpp       



git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@495 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-04-19 22:13:21 +00:00
Tomasz Sowa 7a4a8e0fe2 added: container LastContainer (lastcontainer.h lastcontainer.cpp)
it consists of last logged users
added: function 'last'


git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@492 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-04-16 01:59:42 +00:00
Tomasz Sowa bbaefd0f77 added: date_creation and date_modification to items
changed: function 'run' is using a template: fun_run.html
         there is: [item_run] called from this template


git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@489 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-03-22 23:54:15 +00:00
Tomasz Sowa 951d0e8653 changed: DirContainer - uses std::list instead of std::vector as the main container
we do not have to rebuild indexes after deleting some items
added:   DirContainer::DelById(long id)
changed: Dirs::CheckRootDir() addes the root dir if there is no one
added:   Dirs::DeleteDir(long id) - deletes specified directory (and its contents)
         (from the cache and the database)
added:   Db::DelDirById(long id) - deletes a dir from the database 
         and its first children
added:   standard function rm can delete directories


git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@487 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-02-06 13:12:03 +00:00
Tomasz Sowa 7d73d048c8 added: SessionContainer special container used by SessionManager
sessions are indexed by id and time (last used time)
changed: old sessions are deleted
       parameter: session_max_iddle in the config file
added: function 'who'


git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@483 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-01-31 06:53:36 +00:00
Tomasz Sowa a48766871d fixed: the way AppDb works (pg_conn and Connect method)
git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@482 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-01-27 18:43:44 +00:00
Tomasz Sowa 406cb4a619 changed: not logging (headers and body)
git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@480 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-01-26 21:21:07 +00:00
Tomasz Sowa 9418cc7a69 default.item has to be default.cpp
git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@479 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-01-26 21:08:42 +00:00
Tomasz Sowa 20f6fbcf84 changed: the way of building the cmslu
main Makefile is in an application directory
         in cmslu/ there are only libraries:
         core.a content.a confparser.a templates.a
added:   macros APPTEMPLATES APPFUNCTIONS
         defined in the application's Makefile
added:   PatternCacher
added:   cmslu function 'run'
         files which have exec permissions
         can be run (run is a default function)
         after read from the database the content is parsed
         into Ezc::Pattern object, this object is then cached
         in PatternCacher
added:   FunctionCodeParser - will be used to parse the code
         from standard functions (ls/cat/...)


git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@475 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-01-26 20:49:28 +00:00
Tomasz Sowa 327f18525c changed: cmslu building
Makefile from cmslu/ builds only: confparser.a content.a core.a templates.a
         the proper *.fcgi file is created from an application
changed: all cmslu functions have english names (ls, emacs, etc)
fixed:   function: login/logout are placed where there are permissions


git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@474 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-01-14 20:11:12 +00:00
Tomasz Sowa 8a0ea59c77 added: function: default
changes the default item in a directory


git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@473 e52654a7-88a9-db11-a3e9-0013d4bc506e
2008-12-31 18:28:12 +00:00
Tomasz Sowa f6ad846927 I forgot to commit content/mkdir.cpp
git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@472 e52654a7-88a9-db11-a3e9-0013d4bc506e
2008-12-31 13:40:23 +00:00
Tomasz Sowa 114b5724f8 added: function: mkdir
git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@471 e52654a7-88a9-db11-a3e9-0013d4bc506e
2008-12-31 13:36:46 +00:00
Tomasz Sowa 3e328932fc added: created directory 'content' which has Content:: files
added:   created directory 'templates' which has Templates:: and TemplatesFunctions:: files
changed: content.cpp split into many files (directory 'content')
changed: templates.cpp split into many files (directory 'templates')
added:   full permissions
changed: building of the program (GNU make is used now)
         Makefile and Makefile.dep added into directories
added:   a parser 'FunctionParser'
         is used to parse the GET string
         it recognizes directories, items, functions, functions parameters
added:   other classes: Function, Functions 
added:   function: ls, privileges
changed: function 'id' to 'node'
changed: version: to 0.2.0
added/changed: a lot of work have been done


git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@469 e52654a7-88a9-db11-a3e9-0013d4bc506e
2008-12-30 01:05:03 +00:00
Tomasz Sowa fac60a197b changed: there is one dir called root (has parent_id -1)
(we have an owner, group, privileges etc of the root dir)
         the root.id of course is not -1 


git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@468 e52654a7-88a9-db11-a3e9-0013d4bc506e
2008-12-22 16:03:03 +00:00
Tomasz Sowa 55cd813141 added: privileges (user, groups, permissions)
(not finished yet)
       classes: User, Group, Users, Groups, UGContainer
changed: Dir class into Dirs


git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@467 e52654a7-88a9-db11-a3e9-0013d4bc506e
2008-12-21 21:17:09 +00:00
Tomasz Sowa 86f28faf8d changed: db: table item: url_subject into url
changed: item.url_subject into item.url
changed: a new table: content
         with: id, subject, content, content_type
         (those from the item table)
         it helps to create hard links


git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@466 e52654a7-88a9-db11-a3e9-0013d4bc506e
2008-12-14 05:28:28 +00:00
Tomasz Sowa 023faa66fc added: config: base_url_redirect
when true the server checks whether HTTP_HOST environment variable
       is the same as base_url from the config (of course without the 'http://' part
       and the last slash) - if it's not the same then the server
       redirects you into a new location base_url+REQUEST_URI
changed: variables env_* from Request are never null (after Request::Read())
       if the server didn't set such a variable it will be pointing into an empty string "\0"


git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@465 e52654a7-88a9-db11-a3e9-0013d4bc506e
2008-12-12 03:11:29 +00:00
Tomasz Sowa 3462cdf827 I forgot to add config.h and config.cpp into the repository
git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@464 e52654a7-88a9-db11-a3e9-0013d4bc506e
2008-12-11 02:48:25 +00:00
Tomasz Sowa 8aab988752 added: program reads its configuration from a config file
added: confparser directory and confparser.h and confparser.cpp
       class ConfParser used to parse a config file
       this is a generic parser, can be used by another project
added: config.h, config.cpp
       class Config used for assigning values from 
       a config file into the data object
added: function for signals: SIGINT, SIGHUP
       after receiving SIGHUP the program will read
       its config file again


git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@463 e52654a7-88a9-db11-a3e9-0013d4bc506e
2008-12-11 02:46:16 +00:00
Tomasz Sowa c53e985a92 import the first version of cmslu
git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@460 e52654a7-88a9-db11-a3e9-0013d4bc506e
2008-12-10 04:42:49 +00:00
Tomasz Sowa d4a5f1f963 creating directory cmslu/trunk
git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@459 e52654a7-88a9-db11-a3e9-0013d4bc506e
2008-12-10 04:41:09 +00:00