New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V5.0 [FIX] fix topology to establish a dependency on opening internal ports #13

Merged
merged 5 commits into from Jan 3, 2019
File filter...
Filter file types
Jump to file or symbol
Failed to load files and symbols.
+7 −7
Diff settings

Always

Just for now

Prev

[FIX] fix certificate domain matching problem

  • Loading branch information...
王东
王东 committed Jan 3, 2019
commit d5d5795fb1ad786038e811a9f213eb27308b5449
@@ -122,14 +122,14 @@ def __check_domain_name(self, team_name, domain_name, domain_type, certificate_i
cert = base64.b64decode(certificate_info.certificate)
data = analyze_cert(cert)
certificat_domain_name = data["issued_to"]
if not certificat_domain_name.startswith("*"):
if certificat_domain_name != domain_name:
return 400, u"域名和证书不匹配"
else:
if certificat_domain_name.startswith('*'):
domain_suffix = certificat_domain_name[2:]
domain_str = domain_name.encode('utf-8')
if not domain_str.endswith(domain_suffix):
return 400, u"域名和证书不匹配"
else:
domain_suffix = certificat_domain_name
logger.debug('---------domain_suffix-------->{0}'.format(domain_suffix))
domain_str = domain_name.encode('utf-8')
if not domain_str.endswith(domain_suffix):
return 400, u"域名和证书不匹配"

return 200, u"success"

ProTip! Use n and p to navigate between commits in a pull request.