Age | Commit message (Collapse) | Author | Files | Lines |
|
Not entirely sure if this is what was happening, but if a
PAMSG_LOGIN_RNDTRGR was handled, a new pending account was always
created and appended to mPendingAccounts. However, when handling the
follow-up PAMSG_LOGIN, only the first pending account with matching
username was checked, which could result in a failed login due to
mismatching token.
Resolved this issue by unifying the client-specific random token with
the Stellar token stored on the AccountClient. This means the username
value in PAMSG_LOGIN_RNDTRGR could be removed.
Eventually it would also be nice to simplify this further such that the
token is automatically sent to the client after connecting rather than
being something that needs to be requested.
|
|
When using login with Stellar, the email address remains empty. This was
causing issues since the email is also required to be unique, in effect
only a single Stellar account could exist.
Resolved this by allowing the email column to be null, since the unique
requirement does not cover null values. An empty email will now be
stored as null value.
For non-Stellar logins, an email address is still required.
|
|
Previously errors would just cause it to return an empty set.
|
|
Something doesn't seem to be working right...
|
|
Fixes many memory leaks, but also made it clear that we're very often
loading all the character data only to immediately throw it away again,
even when most of the time all we really need is the database ID or the
name.
|
|
* Overall includes cleanup
* Use std::make_pair
* Make some functions const
|
|
The client needs to know the URL to open in the browser. The bare token
is still sent as well, which might allow the client to directly interact
with a Stellar wallet in the future.
|
|
|
|
Using atomic operations to avoid a compiler potentially optimizing away
the thread responsible for clean shutdown.
|
|
* Added PAMSG_STELLAR_LOGIN / PAMSG_STELLAR_LOGIN_RESPONSE, which is
used by the client to request a login token that can be signed using a
Stellar wallet.
* Added uWebSockets dependency, used to listen for a separate server
that verifies signed tokens (the Stellar Bridge). When a token is
verified, it is sent to manaserv-account, which then sends a
APMSG_LOGIN_RESPONSE to the client matching the token.
* Added RapidJSON dependency to parse the JSON WebSocket messages.
* To keep everything in a single thread, uWebSockets is now driving the
event loop. Processing of ENet hosts, writing stats and expired bans
have been moved to uSocket timers.
* C++ standard updated to C++17, as required by uWebSockets.
When Stellar is used to login, the public key is used as the username.
It might be better to introduce an explicit field for this, especially
when we want to enable an account to feature both Stellar login as well
as login with username / password.
|
|
The result of the first part of the condition, "itA < endA", was simply
unused. Discovered thanks to attribute ‘nodiscard’ [-Wunused-result] in
more recent C++ standard / compiler.
|
|
Especially to change them to lowercase.
|
|
modernize-loop-convert
modernize-deprecated-headers
|
|
modernize-use-auto
modernize-use-nullptr
modernize-use-override
modernize-use-using
|
|
Finishing 213af0fbde3f198ad1ab2143d32fc6798b7f8f50.
|
|
|
|
|
|
This is because the network interface on which the account server
listens to the game server does not need to match the one on which the
account server listens to the client.
|
|
Fixed by changing account instances to be managed by std::unique_ptr, so
we don't forget to delete them somewhere, like in that function as well
as during shutdown in AccountHandler.
|
|
We now require at least PhysFS 2.1.
Also no longer add the "current directory" to the search path and allow
the "PKG_DATADIR" used to locate files shipping with the server to be
overridden by the "serverPath" configuration variable.
Closes #81
|
|
Appears to have been entirely unnecessary.
|
|
If it fails, we will need to destroy the packet ourselves rather than
relying on enet to eventually destroy it.
|
|
Now lua_resume takes 4 arguments, and the number of result values is set
on the 4th one.
|
|
"warning: dynamic exception specifications are deprecated in C++11"
Fortunately, it's effectively the same thing as not mentioning anything
at all. The fact that these functions can throw this exception is
already in their documentation.
|
|
|
|
We also support the newer versions and systems like Fedora do not ship
the older lua versions.
|
|
It seems like properly upgrading to Lua 5.3 would affect quite a few
small function calls, but fortunately compatibility can be achieved with
just a define for now.
|
|
For whatever reason, GCC 5.1 no longer finds an operator<< overload
for streaming a std::ostringstream into a std::ostringstream.
|
|
|
|
Indexing an array with a negative int as index is no good idea...
|
|
|
|
|
|
- Deleted empty constructor rather than throwing, resulting in compiletime
errors rather than runtime errors.
- Removed some remainings of currentMana
- Fixed some compiler warnings regarding structs getting forward
declared as classes.
|
|
|
|
|
|
|
|
This makes it easier on the client to decide whether to immediately open
the Create Character page or to go to the Choose Character page.
Still supports client version 9 as well.
|
|
|
|
|
|
Note @Bertram25: c++11 comes with lowest() min() for float types only
returns the next positive value > 0.
|
|
|
|
|
|
Without this message it is not possible to reliably know how many items
were traded with an NPC at the client side. It helps with updating the
shop's inventory.
|
|
|
|
|
|
|
|
I was wrong to assume that we do not need it. The accountserver needs to
send the info the the client in order to display the equipment on the
character selection page.
|
|
|
|
wrapped the code parts with {} to prevent trashing the scope too much
|
|
|