The stuff in CUtils::GetHashPass() and CUtils::GetSaltedHashPass() shouldn't
hurt, since we don't do such stuff in other places for passwords either.
This should improve the readability of the code a lot.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1324 726aef4b-f618-498e-8847-2d620e286838
Now every module that uses CSocket automatically gets its generated traffic
counted. Those which use Csock directly should be shot and burried anyway ;)
This adds CModule::IsGlobal().
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1283 726aef4b-f618-498e-8847-2d620e286838
I just got this: (binding to ::1 on an ipv4-only build)
Module [webadmin] aborted: Could not bind to port 8080: No such file or directory
Module [webadmin] aborted: Could not bind to port 8080: Success
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1259 726aef4b-f618-498e-8847-2d620e286838
This also changes the layout of the default skin a little, because it was
a little messed up. I still don't like the result, but meh, send patches!
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1187 726aef4b-f618-498e-8847-2d620e286838
This should hopefully fix a couple of 'Excess flood' problems we were having.
Thanks to SilverLeo for finally writing this :P
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1177 726aef4b-f618-498e-8847-2d620e286838
This also removes all the code catching those exceptions. There was nothing
which justified these exceptions and removing them doesn't hurt.
ByeBye CException::EX_BadModVersion
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1137 726aef4b-f618-498e-8847-2d620e286838
auth modules = imapauth and saslauth
Some code in CWebAdminSock::OnLogin() is skipped if a module handles auth
and thus m_pUser stays NULL. Most checks for admin rights only check for
m_pUser being NULL and thus any user WHO ALREADY HAS A VALID LOGIN can edit
other users if they know their user name.
(=Change the password of an admin and log in using this info)
One of the major excpeptions are the templates which use m_bAdmin instead of
m_pUser for checking the privieleges, thus users still see the normal pages
and this bug stayed unnoticed for a while.
This patch now moves the code that sets m_pUser to some code which is executed
in both cases, when an auth module is in effect and when one isn't.
(Well, technically this isn't a move, but code duplication, but executing this
twice won't hurt and one of the follow-up patches cleans this up.)
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1113 726aef4b-f618-498e-8847-2d620e286838
In r1058 the behaviour of CUser::Clone() was changed. It now also handles the
channel settings. This change breaks webadmin, because it doesn't properly
set up the channels it feeds to CUser::Clone()
This commit 'fixes' this by adding an extra parameter to CUser::Clone() which
makes it revert to the old behaviour. Webadmin uses this parameter.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1074 726aef4b-f618-498e-8847-2d620e286838
This removes some commented out functions and it also
removes CFir::Exists() since CFile::IsDir() does exactly
the same job (and it uses fewer syscalls for that).
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1042 726aef4b-f618-498e-8847-2d620e286838
Since adding and editing users is handled pretty much the same way in webadmin,
you could change your user name when you sent a POST requests with some
arbitrary user field:
echo "user=newuser&submitted=1" | \
lynx -post_data -auth=user:pass http://localhost:55455/edituser
This was spotted by SilverLeo who seems to spend quite some time trying to make
ZNC break, which is a good thing. Thanks!
Oh and btw, the last commit (delete the pid file) is from SilverLeo.
I forgot to mention him in the commit msg. Sorry.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@949 726aef4b-f618-498e-8847-2d620e286838
This was just recently introduced in rev 935 "Display user's vhost if it's
not in the global vhost list".
Thanks to icu and Kuja for reporting.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@937 726aef4b-f618-498e-8847-2d620e286838
All the headers are now self-contained (g++ Header.h -o /dev/null).
Some system headers where moved to the .cpp they are actually needed in,
some of our own headers are includes less. (Especially MD5.h)
Headers are sorted alphabetically while in e.g. FileUtils.cpp FileUtils.h
is the first file included.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@915 726aef4b-f618-498e-8847-2d620e286838
Based on darix' patch I wrote this. Modperl's changes were not tested since I
didn't find someone who could test it. Well...
Ah and btw it regenerates configure
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@902 726aef4b-f618-498e-8847-2d620e286838
Now webadmin uses what you have in your <User> section for DefModes,
BufferCount, AutoCycle and KeepBuffer when you create a new user.
Thanks to SilverLeo for noticing and writing this patch.
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@886 726aef4b-f618-498e-8847-2d620e286838
This message is always displayed when the module returns (well, screw webadmin)
and this way a module can notify the user if it loaded but something unexpected
happened.
As you might guess, no one uses this ATM :)
Proposal comes from prozac
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@855 726aef4b-f618-498e-8847-2d620e286838
- module api change, if module fails to load it can give back an useful error message
- give a message when client doesnt supply a password when connecting
- some minor cleanup
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@803 726aef4b-f618-498e-8847-2d620e286838
- increased select timeout to 0.5 secs (this should save CPU time)
- added real-life ISpoof example to the example znc.conf
- make away module ignore message from the user (fixes antiidle together with away)
- show error message when webadmin cant bind to a port (improved later)
- fix /me, it was turned into a CTCP
- remove an extra space
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@802 726aef4b-f618-498e-8847-2d620e286838
- add timezone offset if server is in another timezone than the client
- add prependTimestamp
- add version number to configure.in
- write connect delay back into znc.conf
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@801 726aef4b-f618-498e-8847-2d620e286838
- module call for /me's
- timestamps for playback and query buffer
- WALLOP stuff / fix
- properly join channels _after_ namesx or uhnames were set up
- dont screw up raws on reconnect when you ran /lusers
- change default quit msg and version reply to CZNC::GetTag(false)
- change CZNC::GetTag() to point to sf.net
- kind of an rewrite for partyline, added fixed channels (this doesnt work on irssi,
did it ever work?)
- add the timestamp support to webadmin too
- add ConnectDelay config option to avoid being killed because we connected too fast
- make znc handle usermodes correctly
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@799 726aef4b-f618-498e-8847-2d620e286838