Commit Graph

33 Commits

Author SHA1 Message Date
Jan Vidar Krey cff10910ad Issue 72: Improve ghost user detection
uhub has the ability to disconnect a 'ghost' user, e.g. if a user
reconnects then uhub will kick the existing user if it is still there.
However, this could also be triggered abusively by having two "tabs" or windows
connect at the same time from the same client. The process of connecting a new
client is rather expensive because it triggers a lot of updates on all connections.

With this change, uhub will only attempt to disconnect the existing client if
it is marked with the "flag_choke" flag, which indicates that messages must be
dropped simply because the client is not accepting data fast enough. This will
cause the new connection to fail because the user is already logged in.

This can be further improved by adding a timestamp for when the connection
previously was provable working. Which is possibly a better and more reliable
way of detecting ghost users.
2019-12-01 13:16:28 +01:00
Boris Pek cf3a6e06df Secure URLs: http --> https (part 2) 2019-04-23 15:59:03 +02:00
Boris Pek ef83b31cec Fix spelling errors 2019-02-25 19:46:24 +01:00
klondike d86ef503b3 Add opbots and unrestricted bots 2014-11-24 12:11:11 +01:00
Jan Vidar Krey 1da917e5b9 Fix crash due to negative max copy length. 2014-09-23 00:01:15 +02:00
Jan Vidar Krey 652ac5f9b9 Fix #211 - ADC IINF should have flag AP for application name, and VE for version.
x# Please enter the commit message for your changes. Lines starting
2014-08-03 22:51:47 +02:00
Jan Vidar Krey 7706e1cb8a Fix copyright year. 2014-05-14 11:39:18 +02:00
Jan Vidar Krey 52211a6bac Updated copyright year. 2013-03-22 20:00:40 +01:00
Jan Vidar Krey f25015927a Clean up white space. 2013-03-22 20:00:40 +01:00
Jan Vidar Krey 845aefc941 Decouple hub and user manager more cleanly. 2012-09-27 15:29:00 +02:00
Jan Vidar Krey ccded3f642 Don't strip the U4/U6 port numbers if updated after login. 2012-05-02 20:45:31 +02:00
Jan Vidar Krey ba26f4c5e2 Update copyright notices and added licenses to files that were missing it. 2011-12-19 10:54:47 +01:00
Jan Vidar Krey f2cb84180a Refactored command parsing.
Allows for automatically tested command parsing by splitting parsing
and invokation of the commands.
2011-12-19 00:34:45 +01:00
Jan Vidar Krey 318163c066 Added support for dynamic commands.
Dynamic commands are user commands that can be added dynamically to
the hub by a plugin.

The example plugin (mod_example.c) adds a !example command that when
invoked send a message to the user who invoked it.
2011-12-09 10:29:50 +01:00
Jan Vidar Krey 9b57279628 Many Visual C++ compile warnings and errors fixed. 2011-01-03 00:03:07 +01:00
Jan Vidar Krey 93be2c584e Reworked plugin APIs slightly, added full support for authentication from plugins. 2010-07-29 08:43:22 +02:00
Jan Vidar Krey 350791cdf8 Added plugin invokers for authentication code. 2010-07-23 01:23:13 +02:00
Jan Vidar Krey 56e5557146 Cleaned up the credentials handling, and made it ready for plugins. 2010-07-12 19:05:50 +02:00
Jan Vidar Krey 963416ad73 Cleanup reference adc message reference counting somewhat. 2010-02-16 20:51:10 +01:00
Jan Vidar Krey 6ac78e1a10 Fix autotest 2010-02-08 00:35:58 +01:00
Jan Vidar Krey 8065903604 Fix bug #108: share limits can be avoided.
This was due to updates to the share limit not being enforced after a succesful login.
2010-02-07 23:08:04 +01:00
Jan Vidar Krey 8e7e8c68f5 gcc v2.95 compile fixes. 2010-01-28 01:06:41 +01:00
Jan Vidar Krey e994f23ea0 Crash fix part 2 2009-11-18 18:35:31 +01:00
Jan Vidar Krey 00995a1946 Fix potential memory leaks and crashes. 2009-11-18 17:41:28 +01:00
Jan Vidar Krey 69f6d811bf Added lots of asserts, and split out the ip address from the connection object.
Still a lot of work remains and a massive network connection cleanup is needed.
2009-09-29 00:30:52 +02:00
Jan Vidar Krey 86ba3ca86f Complete moving all connection related data out of the hub_user object. 2009-08-07 00:22:30 +02:00
Jan Vidar Krey 9f784e808e Fix bug #70 - crash if client is in nat_ip zone, but does not provide an IP in the INF message. 2009-08-04 01:02:49 +02:00
Jan Vidar Krey 4e43746c1b Moved the ipaddr object into the connection object. 2009-08-03 18:14:34 +02:00
Jan Vidar Krey 817250c528 Fix wrong #if to #ifdef 2009-07-26 01:53:53 +02:00
Jan Vidar Krey f176e790e2 Whitespace fixes. 2009-07-26 01:53:01 +02:00
Jan Vidar Krey 367871e476 Renamed all "struct user" to hub_user in order to resolve a naming conflict on OpenWRT.
Basically: sed -i 's/struct user/struct hub_user/g' `find -type f`
2009-07-26 01:47:17 +02:00
Jan Vidar Krey 6e5d28c2d4 Rework logging code to be able to turn it off completely. 2009-07-26 01:38:38 +02:00
Jan Vidar Krey 36a07e3f7e Reorganized sources slightly. 2009-07-25 20:05:27 +02:00