Skip to content
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

Escape TLS certificate DNs that are invalid UTF-8 #1486

Merged
merged 2 commits into from
Apr 14, 2021

Conversation

timopollmeier
Copy link
Member

@timopollmeier timopollmeier commented Apr 13, 2021

What:
The subject and issuer DNs are checked whether they are valid UTF-8
before storing them in the database. If they are not, all non-ASCII
characters are escaped.

Why:
The invalid characters would cause SQL errors when then TLS
certificates are added at the end of a scan.

How did you test it:

  • Created a self-signed certificate with the GnuTLS certtool
    where the subject contained an ISO 8859-1 encoded umlaut
  • Ran a test HTTPS server with this certificate using gnutls-serv
  • Scanned the host with the test server

Checklist:

The subject and issuer DNs are checked whether they are valid UTF-8
before storing them in the database. If they are not, all non-ASCII
characters are escaped.
@timopollmeier timopollmeier marked this pull request as ready for review April 13, 2021 14:42
@timopollmeier timopollmeier requested a review from a team as a code owner April 13, 2021 14:42
@timopollmeier timopollmeier added backport-to-stable This pull request will be backported to the stable branch backport-to-main This pull request will be ported to the master branch labels Apr 14, 2021
@bjoernricks bjoernricks merged commit 8f1119a into greenbone:gvmd-20.08 Apr 14, 2021
timopollmeier added a commit that referenced this pull request Apr 15, 2021
Escape TLS certificate DNs that are invalid UTF-8 (backport #1486)
timopollmeier added a commit that referenced this pull request Apr 15, 2021
Escape TLS certificate DNs that are invalid UTF-8 (backport #1486)
@timopollmeier timopollmeier deleted the invalid-utf8-cert-dns branch October 15, 2021 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-to-main This pull request will be ported to the master branch backport-to-stable This pull request will be backported to the stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants