[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-challenger] 18/24: code cleaning and styling
From: |
gnunet |
Subject: |
[taler-challenger] 18/24: code cleaning and styling |
Date: |
Mon, 16 Sep 2024 13:26:07 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository challenger.
commit 7be09dcc18d9b1dff53db38c6da71d3a68349fc8
Author: Bohdan Potuzhnyi <potub1@bfh.ch>
AuthorDate: Sun Sep 15 10:28:27 2024 +0000
code cleaning and styling
---
src/challenger/challenger-httpd_authorize.c | 10 +++++-----
src/challenger/challenger-httpd_config.c | 2 +-
src/challenger/challenger-httpd_token.c | 7 ++++---
src/challengerdb/challenger-0001.sql | 4 ++--
src/challengerdb/pg_authorize_start.c | 1 +
src/challengerdb/pg_authorize_start.h | 1 +
src/challengerdb/plugin_challengerdb_postgres.c | 2 +-
7 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/src/challenger/challenger-httpd_authorize.c
b/src/challenger/challenger-httpd_authorize.c
index 18c35c4..5f24fe2 100644
--- a/src/challenger/challenger-httpd_authorize.c
+++ b/src/challenger/challenger-httpd_authorize.c
@@ -144,20 +144,20 @@ CH_handler_authorize (struct CH_HandlerContext *hc,
= MHD_lookup_connection_value (hc->connection,
MHD_GET_ARGUMENT_KIND,
"redirect_uri");
-
+
code_challenge = MHD_lookup_connection_value(hc->connection,
MHD_GET_ARGUMENT_KIND,
"code_challenge");
-
+
code_challenge_method = MHD_lookup_connection_value(hc->connection,
MHD_GET_ARGUMENT_KIND,
-
"code_challenge_method");
+ "code_challenge_method");
if (NULL != code_challenge)
{
if (NULL == code_challenge_method)
code_challenge_method = "plain";
}
-
+
/**
* Safe check to not allow public clients without s256 code_challenge
*/
@@ -178,7 +178,7 @@ CH_handler_authorize (struct CH_HandlerContext *hc,
TALER_EC_GENERIC_PARAMETER_MALFORMED,
"redirect_uri (has to start with 'http://' or 'https://' or not use
'plain'/NULL as code_challenge)");
}
-
+
state
= MHD_lookup_connection_value (hc->connection,
MHD_GET_ARGUMENT_KIND,
diff --git a/src/challenger/challenger-httpd_config.c
b/src/challenger/challenger-httpd_config.c
index 7fa65c3..c8ba888 100644
--- a/src/challenger/challenger-httpd_config.c
+++ b/src/challenger/challenger-httpd_config.c
@@ -28,7 +28,7 @@
*
* 0: original design
* 1: revision to support SPA
- * 2:
+ * 2:
* 3: added support for RFC7636
*/
diff --git a/src/challenger/challenger-httpd_token.c
b/src/challenger/challenger-httpd_token.c
index b633145..3ccd950 100644
--- a/src/challenger/challenger-httpd_token.c
+++ b/src/challenger/challenger-httpd_token.c
@@ -405,7 +405,8 @@ CH_handler_token (struct CH_HandlerContext *hc,
/* Verify the code_challenge if present*/
if (code_challenge != NULL)
{
- if (bc->code_verifier == NULL){
+ if (bc->code_verifier == NULL)
+ {
GNUNET_break_op (0);
GNUNET_free (client_scope);
GNUNET_free (client_secret);
@@ -456,10 +457,10 @@ CH_handler_token (struct CH_HandlerContext *hc,
"server_error",
TALER_EC_CHALLENGER_HELPER_EXEC_FAILED,
"Failed to encode hash to Base64 URL");
- }
+ }
if (0 != strcmp(encoded_hash, code_challenge))
- {
+ {
GNUNET_break_op(0);
GNUNET_free(client_scope);
GNUNET_free(client_secret);
diff --git a/src/challengerdb/challenger-0001.sql
b/src/challengerdb/challenger-0001.sql
index 256ee31..42db4bb 100644
--- a/src/challengerdb/challenger-0001.sql
+++ b/src/challengerdb/challenger-0001.sql
@@ -60,7 +60,7 @@ CREATE TABLE IF NOT EXISTS validations
,client_state VARCHAR
,client_redirect_uri VARCHAR
);
-
+
-- Add columns for PKCE (RFC 7636)
ALTER TABLE validations
ADD COLUMN IF NOT EXISTS code_challenge VARCHAR,
@@ -95,7 +95,7 @@ COMMENT ON COLUMN validations.expiration_time
COMMENT ON COLUMN validations.code_challenge
IS 'Code challenge used for PKCE';
COMMENT ON COLUMN validations.code_challenge_method
- IS 'Code challenge method used for PKCE (plain, s256)';
+ IS 'Code challenge method used for PKCE (plain, s256)';
CREATE INDEX IF NOT EXISTS validations_serial
ON validations (validation_serial_id);
diff --git a/src/challengerdb/pg_authorize_start.c
b/src/challengerdb/pg_authorize_start.c
index c127f53..37a46d6 100644
--- a/src/challengerdb/pg_authorize_start.c
+++ b/src/challengerdb/pg_authorize_start.c
@@ -16,6 +16,7 @@
/**
* @file challengerdb/pg_authorize_start.c
* @brief Implementation of the authorize_start function for Postgres
+ * @author Christian Grothoff
* @author Bohdan Potuzhnyi
* @author Vlada Svirsh
*/
diff --git a/src/challengerdb/pg_authorize_start.h
b/src/challengerdb/pg_authorize_start.h
index 8f336c3..d6c737a 100644
--- a/src/challengerdb/pg_authorize_start.h
+++ b/src/challengerdb/pg_authorize_start.h
@@ -16,6 +16,7 @@
/**
* @file challengerdb/pg_authorize_start.h
* @brief implementation of the authorize_start function for Postgres
+ * @author Christian Grothoff
* @author Bohdan Potuzhnyi
* @author Vlada Svirsh
*/
diff --git a/src/challengerdb/plugin_challengerdb_postgres.c
b/src/challengerdb/plugin_challengerdb_postgres.c
index c675add..7732529 100644
--- a/src/challengerdb/plugin_challengerdb_postgres.c
+++ b/src/challengerdb/plugin_challengerdb_postgres.c
@@ -417,7 +417,7 @@ libchallenger_plugin_db_postgres_init (void *cls)
plugin->info_get_token
= &CH_PG_info_get_token;
plugin->token_add_token
- = &CH_PG_token_add_token;
+ = &CH_PG_token_add_token;
return plugin;
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-challenger] branch master updated (3f892c8 -> 208ab47), gnunet, 2024/09/16
- [taler-challenger] 05/24: small update of logs for authorize.c, gnunet, 2024/09/16
- [taler-challenger] 04/24: small changes to logs and db function names, gnunet, 2024/09/16
- [taler-challenger] 02/24: in theory done, but needs live testing and adjustments, gnunet, 2024/09/16
- [taler-challenger] 03/24: base64 less strange now, still needs check for a normal way, gnunet, 2024/09/16
- [taler-challenger] 09/24: happy path pkce tests added, gnunet, 2024/09/16
- [taler-challenger] 01/24: db part is done(new approach), gnunet, 2024/09/16
- [taler-challenger] 08/24: tests for pkce added, gnunet, 2024/09/16
- [taler-challenger] 07/24: small db validation_get.c update, gnunet, 2024/09/16
- [taler-challenger] 18/24: code cleaning and styling,
gnunet <=
- [taler-challenger] 10/24: added test for the wrong code_verifier, gnunet, 2024/09/16
- [taler-challenger] 21/24: small fix, gnunet, 2024/09/16
- [taler-challenger] 22/24: small cleanup, gnunet, 2024/09/16
- [taler-challenger] 06/24: small db start_pkce.c update, gnunet, 2024/09/16
- [taler-challenger] 12/24: merged 2 pkce test files into one, gnunet, 2024/09/16
- [taler-challenger] 14/24: version update, gnunet, 2024/09/16
- [taler-challenger] 16/24: change to using GNUNET_STRINGS_base64url_encode, gnunet, 2024/09/16
- [taler-challenger] 23/24: move from src to main dir, uncrustify, gnunet, 2024/09/16
- [taler-challenger] 13/24: file cleaning, gnunet, 2024/09/16
- [taler-challenger] 11/24: adding test .sh file, gnunet, 2024/09/16