dpgaspar commented on a change in pull request #9436: Add check for SSL
certificate and add form validators
URL:
https://github.com/apache/incubator-superset/pull/9436#discussion_r401573436
##########
File path: superset/views/database/validators.py
##########
@@ -53,3 +55,21 @@ def schema_allows_csv_upload(database, schema):
security_manager.database_access(database)
or security_manager.all_datasource_access()
)
+
+
+def certificate_validator(
+ certificate: Optional[str], exception: Type[ValidationError] =
ValidationError
+) -> None:
+ if certificate:
+ try:
+ parse_ssl_cert(certificate)
+ except CertificateException:
Review comment:
I think we could change the `CertificateException` class and add the message
property with this, then here just let `parse_ssl_cert` fail
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]