potiuk commented on code in PR #34712:
URL: https://github.com/apache/airflow/pull/34712#discussion_r1349384221


##########
airflow/api_connexion/endpoints/config_endpoint.py:
##########
@@ -123,7 +123,7 @@ def get_value(section: str, option: str) -> Response:
                 "Config not found.", detail=f"The option [{section}/{option}] 
is not found in config."
             )
 
-        if (section, option) in conf.sensitive_config_values:
+        if (section.lower(), option.lower()) in conf.sensitive_config_values:

Review Comment:
   Agree with @hussein-awala . I think the proposed way is right. The 
"www/views.py" code displays all the sections/options from the config and then 
then from sensitive_config_values. What we are preventing here is that 
differently cased section/option is passed by the user, so the source of 
section/key are not the config itself, but external to it. We can safely assume 
that the config has the right sections/keys (that's why the code in views.py 
works).  But we cannot make the same assumption about the values passed by the 
user so we have to lowercase them.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to