Commit graph

68 commits

Author SHA1 Message Date
ebbit1q
2fc85e0c08
use hashed passwords in all commands (#4493)
* protocol changes

* server changes

* client changes for password reset and registration

* add hashed password to change password in client

* always use hashed password to log in

* add warning to client when using plain text password

* require real password for changing email on server

this is backwards compatible as users logged in with a real password on
older clients will not need this, only users logged in with a hashed
password

* implement password dialog when changing email

* require min password length

* use qstringlist to build query instead

* use clear instead of = ""

* add max to password dialog

* use proper const ness in abstractclient

* reject too long passwords instead of trimming
2022-01-16 20:32:30 -05:00
ebbit1q
1347d88ddb
also forgot this in #4496 (#4514) 2022-01-08 16:01:54 -05:00
ebbit1q
4d6c9ede8c
missed this in #4496 (#4512) 2022-01-07 00:34:56 -05:00
ebbit1q
07e6aadbbe
deprecate the gender property from the protocol entirely (#4496)
* deprecate the gender property from the protocol entirely

* use obsolete instead of deprecated

* add the database migration

* update internal database version as well
2021-12-14 01:51:57 -05:00
ebbit1q
45d86e7ab7
allow login using hashed passwords (#4464)
* Support getting a user's password salt via initial websocket connection (added to Event_ServerIdentification)

* Nonsense stuff to figure out later

* move passwordhasher to correct location

* protobuf changes

* add ext to protobuf

* implement request password salt server side

* add supportspasswordhash to server identification

* check backwards compatibility

* reset some changes to master

* implement get password salt client side

* implement checking hashed passwords on server login

* check for registration requirement on getting password salt

* properly check password salt response and show errors

* remove unused property

* add password salt to list of response types

Co-authored-by: ZeldaZach <zahalpern+github@gmail.com>
2021-11-09 20:00:41 -05:00
Zach H
34e951298f
Address a handful of warnings from #6095 (#4199) 2020-12-01 11:30:22 -05:00
olegshtch
44297dcd1c
Fix release tests (#4063) 2020-08-13 10:18:01 -04:00
ebbit1q
18a07274d4
clangify everything with the new header sorting (#3908) 2020-03-18 17:36:02 -04:00
ebbit1q
a80c756dcb
update deprecated methods in qt5.14 and protobuf 3.4 (#3906) 2020-03-16 20:41:41 -04:00
Zach H
8fb0baa449
Trim tokens as this is our most common issue (#3870)
Signed-off-by: ZeldaZach <zahalpern+github@gmail.com>
2019-11-23 14:18:28 -05:00
Zach H
754b9bdc5a
Won't change if autoconnect enabled (#3602)
* Only will auto-select RR if autoconnect is not checked off.

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>

* Only will auto-select RR if autoconnect is not checked off.

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>

* On disconnect, un-check autoconnect. Better naming.

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>
2019-03-03 21:57:48 -05:00
Rob Blanckaert
63839eb464 Fixes #3590 (#3595) 2019-03-01 18:11:09 -05:00
Rob Blanckaert
c1d25bf58b Add /servatrice to websocket URL to help out reverse proxies. (#3551)
Remove unused define
Use websocket port from default servers if given.
2019-02-03 22:50:19 +01:00
Rob Blanckaert
9a8c81cf5e Client Websockets (#3545)
* Websockets

* Add setting to get websocket IP from header

* Add QT version guard

* Minor cleanup

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>

* - Make QWebSocket required
- Remove QWEBSOCEKT_LIB guards
- Only TCP on port 4747
- Fix peerName lookup

* fix check

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>

* Update CMakeLists.txt

* Update CMakeLists.txt
2019-02-03 11:43:22 +01:00
ctrlaltca
b29bd9e070
Clang-format (#3028)
* 1/3 Add .clang-format file and travis compilation check

* 2/3 Run clang-format

* 3/3 Fix compilation problems due to include reordering

* 3bis/3 AfterControlStatement: false
2018-01-27 10:41:32 +01:00
Fabio Bas
a4e78bbfa2 remove debug 2017-05-05 15:23:59 +02:00
Zach H
0da2bdd7aa additional null checks in player, gameselector, remoteclient, log (#2514) 2017-03-19 12:55:55 -04:00
woogerboy21
d0088f6a18 Server audit table (#2423)
* Creating of server side audit table for auditing actions such as password resets, account registrations and log queries.

* Add migration script

Add migration script for database

* Update database script

Update database script to reflect new audit table

* Creating of server side audit table for auditing actions such as password resets, account registrations and log queries.

* Add migration script

Add migration script for database

* Update database script

Update database script to reflect new audit table

* Corrected results column possible value(s).

* Fixed migration script.

* Added boolean audit logic

Added enable/disable audit options
Added audit functionality for forgot password

* Added registration auditing

Added registration auditing

* Updated ActivateAccount Function

Created clientid variable and used it in preporation for future
potential protocol expansion.

* Extended activation protocol

Added clientid to activation command protocol

* Typo correction

Fix typo's

* Missed type fix

Found the infamous E!

* Updated database function syntax

Updated if/else syntax in db add audit function

* Untabify content

Untab files changed in PR
2017-02-25 13:48:31 -05:00
woogerboy21
0cfa6863d5 Simpler forgot password functionality (#2393)
* Simpler forgot password functionality (Server/Client)
2017-02-15 17:41:40 -05:00
woogerboy21
d039c9b6bd Add missing feature rememberance to client (#2275)
Fix #2249
Add the ability for the client to remember the missing features that it
received from the server it last connected to and not display the
"missing/optional feature" message at every login.
2016-11-29 15:50:00 -05:00
woogerboy21
6962777ded Rework idle timeout, now server side (#2259)
* Server side idle timeout

Initial commit for server side idle timeout counter.  This adds a new
int value that is updated when room/game/mod/admin commands occur and is
checked during the regular ping timout function that if the users new
"idle" value exceeds the idleclienttimeout value defined in the servers
configuration file the user is logged out.  The user will receive a
warning at the 90% time frame mark about being idle.

* Use round instead of ceil

Travis fix for older xcode issue's.

* Fixed requested items

Mis-spelleed function, added header, added warning message sent check
value.  Also corrected the protobuf declaration file for
event_notifyuser

* Moved bool to protected

* Re-Ordered Declarations

* Removed most stylistic items

Resolved most noted things.

* Remove client side idle timeout

Removed client side idle timeout functionality
2016-11-08 22:18:12 -05:00
woogerboy21
63a4f147f4 Add client UI setting for idleclientdisconnect (#2244)
* Add client UI setting for idleclientdisconnect

Added disabled option in client UI for client disconnect.

* Updated settings text

Updated settings text for clarity.

* Updated descripton text (again)

Per request for clarity
2016-10-29 04:24:18 -04:00
Kevin Boxhoorn
1cbf67ab57 Merge branch 'master' of https://github.com/Cockatrice/Cockatrice into login-error-fix 2016-10-10 20:52:58 +11:00
woogerboy21
7af2f3f057 Idle Client Timeout Functionality
Added the functionality client side to log users out of servers if they
are idle for more than 1 hour without joining either a game or room.
Sending a message (room/game/private) or performing a game action.
2016-10-09 13:55:07 -04:00
Kevin Boxhoorn
6825486776 Prevent login error handler being incorrectly called (#2176)
In some situations, when the server disconnects the client during a login,
multiple dialogs will be shown. This is undesirable behavior, and hence
`loginError` should only be called when the client is actually connected
(`response.response_code() != Response::RespNotConnected`).
2016-09-29 12:21:06 +10:00
woogerboy21
63bf0029aa Updated client id generation to use host ip rather than name 2016-07-21 09:20:28 -04:00
woogerboy21
44123b9b0b Untabify
Yay!  Figured out how to do this in VS2015!
2016-03-30 15:30:58 -04:00
woogerboy21
506ad91b03 Privatized Function
Moved the updated hashing function out of the settingscache and into the
remoteclient and privatized the function for proper use.
2016-03-29 22:00:42 -04:00
woogerboy21
ee849f6379 Updated ClientID Functionality
ClientID is now generated on startup and stored in settings cache.  Then
upon connect there is a new SrvClientID generated from the ClientID +
servername being connected to
2016-03-29 17:05:25 -04:00
woogerboy21
044c2356ff Added server/client feature set communication 2015-09-02 17:54:06 -04:00
woogerboy21
364df4daf0 Extend the login protocol to send the client id (as optional) 2015-08-24 11:38:24 -04:00
woogerboy21
b102a05a36 Add ability to ban by client id 2015-08-14 00:06:37 -04:00
woogerboy21
52db13a1ca Initial release of client ID generation. 2015-08-05 10:15:49 -04:00
woogerboy21
8c7301b19f Updated server and client ping to 5 seconds. Also changed hard set 1 second value on the ping timers to read values from the settings cache. 2015-07-29 23:44:00 -04:00
Fabio Bas
d6cee242e3 Another gcc warning-as error removal 2015-05-24 00:53:08 +02:00
Fabio Bas
ff1aed717e Added token generation, user activation command and response. 2015-05-24 00:37:45 +02:00
Fabio Bas
5ace0dd892 Almost completed registration
* added missing bits of serverside code;
 * added fronted in client;
 * removed demo python scripts;
2015-05-23 20:13:03 +02:00
Gavin Bisesi
86fa8f304d Change client send-ping timer back to 1sec
9sec was causing too many timeout issues.

Timeout from both client and server perspective needs to be revisited
2014-07-09 19:06:31 -04:00
Daenyth
4d6f46b06e Change client ping send interval to 9 sec 2014-06-29 14:46:06 -04:00
Matt Kelly
1bc48a7849 Convert rest of source to 4-space indent 2014-02-11 11:14:19 -05:00
Max-Wilhelm Bruker
7c1ca629df cleaned up remoteclient.cpp compiler warnings 2012-06-03 20:29:33 +02:00
Max-Wilhelm Bruker
8b3a3c285a additional minor fix wrt issue #42 2012-05-09 23:28:13 +02:00
Max-Wilhelm Bruker
295cc65dce minor fix wrt issue #42 2012-05-09 23:25:29 +02:00
Max-Wilhelm Bruker
b9087715bf fixed issue #42: make 'client deprecated' message work for v13 client <-> v14 server 2012-05-09 23:13:23 +02:00
Max-Wilhelm Bruker
f7975d8ace fixed issue #50: ensure that tcp_nodelay is set 2012-05-09 21:57:06 +02:00
Max-Wilhelm Bruker
e76502cf0e handle dead commands when the connection is lost before the reply gets processed 2012-05-01 21:16:16 +02:00
Max-Wilhelm Bruker
ae19d3dc4b fixed game list update bug, minor optimizations, restrict client protocol output to QT_DEBUG mode 2012-04-06 17:52:23 +02:00
Max-Wilhelm Bruker
a319ce3afb fix for rare condition when the game screen would remain white when the game starts 2012-04-01 21:15:13 +02:00
Max-Wilhelm Bruker
13b992cf12 show ban duration in client 2012-03-31 12:07:25 +02:00
Max-Wilhelm Bruker
fd5be3d525 added option --debug-output to redirect client output to file 2012-03-25 19:48:50 +02:00