Review: Approve

Code LGTM, just some small nits for the comments

Diff comments:

> === modified file 'src/network/internet_gaming.cc'
> --- src/network/internet_gaming.cc    2019-05-25 08:25:55 +0000
> +++ src/network/internet_gaming.cc    2019-06-01 12:37:21 +0000
> @@ -405,6 +452,12 @@
>                           asctime(gmtime(&now)));
>                       return;
>  
> +             } else if (cmd == IGPCMD_PWD_OK) {
> +                     const time_t now = time(nullptr);
> +                     log("InternetGaming: Password check successfully at UTC 
> %s", asctime(gmtime(&now)));

Wither "Password checked successfully" or "Password check successful"

> +                     state_ = LOBBY;
> +                     return;
> +
>               } else if (cmd == IGPCMD_ERROR) {
>                       std::string errortype = packet.string();
>                       if (errortype != IGPCMD_LOGIN && errortype != 
> IGPCMD_PWD_CHALLENGE) {
> 
> === modified file 'src/network/internet_gaming_protocol.h'
> --- src/network/internet_gaming_protocol.h    2019-02-23 11:00:49 +0000
> +++ src/network/internet_gaming_protocol.h    2019-06-01 12:37:21 +0000
> @@ -182,7 +183,29 @@
>  static const std::string IGPCMD_LOGIN = "LOGIN";
>  
>  /**
> - * This is sent by the metaserver after a IGPCMD_LOGIN by a registered 
> client.
> + * The client tries to check the password of the user without doing a full 
> login.
> + * Should be sent without logging in before.
> + *
> + * Payload:
> + * \li string:    protocol version (see kInternetGamingProtocolVersion)
> + * \li string:    client name
> + * \li string:    build_id of the client
> + *
> + * A IGPCMD_PWD_CHALLENGE exchange follows before the server replies with a 
> IGPCMD_PWD_OK
> + * or IGPCMD_ERROR message.
> + *
> + * If the password is correct, the metaserver replies with a IGPCMD_PWD_OK 
> command
> + * with the following payload:
> + * \li string:    client name. Will be the same as sent before.
> + * \li string:    clients rights (see client rights section above)
> + *
> + * If the password is wrong or some other error occurres, \ref IGPCMD_ERROR 
> is returned.

occurres -> occurred

> + */
> +static const std::string IGPCMD_CHECK_PWD = "CHECK_PWD";
> +static const std::string IGPCMD_PWD_OK = "PWD_OK";
> +
> +/**
> + * This is sent by the metaserver after a IGPCMD_LOGIN or IGPCMD_CHECK_PWD 
> by a registered client.
>   * This is the first message of the a protocol similar to the challenge 
> handshake authentication
>   * protocol (CHAP) for secure transmission of the users password.
>   * The server sends the nonce for hashing:


-- 
https://code.launchpad.net/~widelands-dev/widelands/net-checkpwd-command/+merge/368225
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/net-checkpwd-command.

_______________________________________________
Mailing list: https://launchpad.net/~widelands-dev
Post to     : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to