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
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user