Commit graph

72 commits

Author SHA1 Message Date
ebbit1q
f174614496
assign new arrow id when arrow is moved to transformed card (#5012)
* add timeout to settingscache

* assign new arrow id when arrow is moved to transformed card

fixes bug introduced in #4907
fixes #5008
2024-03-27 14:47:00 +01:00
ebbit1q
2f100f2ba3
fix keepalive being multiplied in server timeout (#4663)
* fix keepalive being multiplied in server timeout

a timeout happened after the client not receiving anything for
keepalive * keepalive * maxtimeout (5 * 5 * 10) seconds instead of what
you'd expect, it now only uses keepalive once instead of twice this
means it should now take 50 seconds to time out when disconnected

* change timeout to 15 seconds instead

change time between pings to 3 from 5 seconds
change timout to 5 from 10 repeats
2022-09-01 02:38:10 +02:00
ZeldaZach
b02adccf87 Support Qt6, Min Qt5.8, Fix Win32, Fix Servatrice
Add lock around deleting arrows for commanding cards

Add support for Qt6 w/ Backwards Qt5

Handle Qt5/6 cross compilation better

Last cleanups

caps matter

Fix serv

Prevent crash on 6.3.0 Linux & bump to 5.8 min

Prevent out of bounds indexing

Delete shutdown timer if it exists

Fixup ticket comments, remove unneeded guards

Try to add support for missing OSes

Update .ci/release_template.md

Update PR based on comments

Update XML name after done and remove Hirsute

Address local game crash

Address comments from PR (again)
Tests don't work on mac, will see if a problem on other OSes

make soundengine more consistent across qt versions

disable tests on distros that are covered by others

Fix Oracle Crash due to bad memory access

Update Oracle to use new Qt6 way of adding translations

Add support for Qt5/Qt6 compiling of Cockatrice

Remove unneeded calls to QtMath/cmath/math.h

Update how we handle bitwise comparisons for enums with Tray Icon

Change header guards to not duplicate function

Leave comment & Fix Path for GHA Qt

Update common/server.h

Update cockatrice/src/window_main.cpp

Rollback change on cmake module path for NSIS

check docker image requirements

add size limit to ccache

put variables in quotes

properly set build type on mac

avoid names used in cmake

fix up cmake module path

cmake 3.10 does not recognize prepend

Support Tests in FindQtRuntime

set ccache size on non debug builds as well

immediately return when removing non existing client

handle incTxBytes with a signal instead

don't set common link libraries in cockatrice/CMakeLists.txt

add comments

set macos qt version to 6

Try upgrading XCode versions to latest they can be supported on

Ensure Qt gets linked

add tmate so i can see what's going on

Qt6 points two directories further down than Qt5 with regard to the top lib path, so we need to account for this

Establish Plugins directory for Qt6

Establish TLS plugins for Qt6 services

Minor change for release channel network manager

Let windows build in parallel cores

Wrong symbols

Qt6 patch up for signal

add missing qt6 package on deb builds

boolean expressions are hard

negative indexes should go to the end

Intentionally fail cache

move size checks to individual zone types

Hardcode libs needed for building on Windows, as the regex was annoying

Update wording

use the --parallel option in all builds

clean up the .ci scripts some more

tweak fedora build

add os parameter to compile.sh

I don't really like this but it seems the easiest way
I'd prefer if these types of quirks would live in the main configuration
file, the yml

fixup yml

readd appended cache key to vcpkg step

fix windows 32 quirk

the json hash is already added to the key as well

remove os parameter and clean up ci files

set name_build.sh to output relative paths

set backwards compatible version of xcode and qt on mac

set QTDIR for mac builds on qt5

has no effect for qt6

export BUILD_DIR to name_build.sh

merge mac build steps

merge homebrew steps, set package suffix

link qt5

remove brew link

set qtdir to qt5 only

compile.sh vars need to be empty not 0

fix sets manager search bar on qt 5.12/15

fix oracle subprocess errors being ignored on qt 5

clean up translation loading

move en@source translation file so it will not get included in packages
NOTE: this needs to be done at transifex as well!

Use generator platform over osname

Short circuit if not Win defined
2022-05-06 17:31:08 -04:00
ebbit1q
7108eb42c8
implement custom protobuf debug string creation (#4532)
* implement custom protobuf debug log string creation

* add version guards

* add missing header

* debian10 repository misses headers

* clean up logging messages a bit

* fix some more formatting on debug messages
2022-02-23 23:46:23 +01:00
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