Skip to content

Commit

Permalink
properly handling post request
Browse files Browse the repository at this point in the history
  • Loading branch information
burnout87 committed Aug 15, 2024
1 parent e8f8082 commit b3c6d51
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions cdci_data_analysis/flask_app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -930,13 +930,13 @@ def get_data_product_list_by_source_name():
return output_list



@app.route('/post_astro_entity_to_gallery', methods=['POST'])
def post_astro_entity_to_gallery():
logger.info("request.args: %s ", request.args)
logger.info("request.values: %s ", request.values)

Check failure

Code scanning / CodeQL

Log Injection High

This log entry depends on a
user-provided value
.

Check warning on line 936 in cdci_data_analysis/flask_app/app.py

View check run for this annotation

Codecov / codecov/patch

cdci_data_analysis/flask_app/app.py#L936

Added line #L936 was not covered by tests
logger.info("request.files: %s ", request.files)

token = request.args.get('token', None)
token = request.values.to_dict().get('token', None)

Check warning on line 939 in cdci_data_analysis/flask_app/app.py

View check run for this annotation

Codecov / codecov/patch

cdci_data_analysis/flask_app/app.py#L939

Added line #L939 was not covered by tests
app_config = app.config.get('conf')
secret_key = app_config.secret_key

Expand All @@ -963,9 +963,10 @@ def post_astro_entity_to_gallery():
@app.route('/post_observation_to_gallery', methods=['POST'])
def post_observation_to_gallery():
logger.info("request.args: %s ", request.args)
logger.info("request.values: %s ", request.values)

Check failure

Code scanning / CodeQL

Log Injection High

This log entry depends on a
user-provided value
.

Check warning on line 966 in cdci_data_analysis/flask_app/app.py

View check run for this annotation

Codecov / codecov/patch

cdci_data_analysis/flask_app/app.py#L966

Added line #L966 was not covered by tests
logger.info("request.files: %s ", request.files)

token = request.args.get('token', None)
token = request.values.to_dict().get('token', None)

Check warning on line 969 in cdci_data_analysis/flask_app/app.py

View check run for this annotation

Codecov / codecov/patch

cdci_data_analysis/flask_app/app.py#L969

Added line #L969 was not covered by tests
app_config = app.config.get('conf')
secret_key = app_config.secret_key

Expand All @@ -992,9 +993,10 @@ def post_observation_to_gallery():
@app.route('/post_product_to_gallery', methods=['POST'])
def post_product_to_gallery():
logger.info("request.args: %s ", request.args)
logger.info("request.values: %s ", request.values)

Check failure

Code scanning / CodeQL

Log Injection High

This log entry depends on a
user-provided value
.

Check warning on line 996 in cdci_data_analysis/flask_app/app.py

View check run for this annotation

Codecov / codecov/patch

cdci_data_analysis/flask_app/app.py#L996

Added line #L996 was not covered by tests
logger.info("request.files: %s ", request.files)

token = request.args.get('token', None)
token = request.values.to_dict().get('token', None)

Check warning on line 999 in cdci_data_analysis/flask_app/app.py

View check run for this annotation

Codecov / codecov/patch

cdci_data_analysis/flask_app/app.py#L999

Added line #L999 was not covered by tests
app_config = app.config.get('conf')
secret_key = app_config.secret_key

Expand All @@ -1020,9 +1022,10 @@ def post_product_to_gallery():
@app.route('/delete_product_to_gallery', methods=['POST'])
def delete_product_to_gallery():
logger.info("request.args: %s ", request.args)
logger.info("request.values: %s ", request.values)

Check failure

Code scanning / CodeQL

Log Injection High

This log entry depends on a
user-provided value
.

Check warning on line 1025 in cdci_data_analysis/flask_app/app.py

View check run for this annotation

Codecov / codecov/patch

cdci_data_analysis/flask_app/app.py#L1025

Added line #L1025 was not covered by tests
logger.info("request.files: %s ", request.files)

token = request.args.get('token', None)
token = request.values.to_dict().get('token', None)

Check warning on line 1028 in cdci_data_analysis/flask_app/app.py

View check run for this annotation

Codecov / codecov/patch

cdci_data_analysis/flask_app/app.py#L1028

Added line #L1028 was not covered by tests
app_config = app.config.get('conf')
secret_key = app_config.secret_key

Expand All @@ -1048,9 +1051,10 @@ def delete_product_to_gallery():
@app.route('/post_revolution_processing_log_to_gallery', methods=['POST'])
def post_revolution_processing_log_to_gallery():
logger.info("request.args: %s ", request.args)
logger.info("request.values: %s ", request.values)

Check failure

Code scanning / CodeQL

Log Injection High

This log entry depends on a
user-provided value
.

Check warning on line 1054 in cdci_data_analysis/flask_app/app.py

View check run for this annotation

Codecov / codecov/patch

cdci_data_analysis/flask_app/app.py#L1054

Added line #L1054 was not covered by tests
logger.info("request.files: %s ", request.files)

token = request.args.get('token', None)
token = request.values.to_dict().get('token', None)

Check warning on line 1057 in cdci_data_analysis/flask_app/app.py

View check run for this annotation

Codecov / codecov/patch

cdci_data_analysis/flask_app/app.py#L1057

Added line #L1057 was not covered by tests
app_config = app.config.get('conf')
secret_key = app_config.secret_key

Expand Down

0 comments on commit b3c6d51

Please sign in to comment.