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

Error handling: missing cn from csr #311

Open
vohmar opened this issue Dec 27, 2016 · 0 comments
Open

Error handling: missing cn from csr #311

vohmar opened this issue Dec 27, 2016 · 0 comments
Labels

Comments

@vohmar
Copy link
Contributor

vohmar commented Dec 27, 2016

IF a request is missing cn system returns "We're sorry, but something went wrong." error message

logs:
Dec 27 09:55:50 test-reg ADMIN[13382]: [testadm] [584b2688-db03-4aa0-9d31-461af46ba0b6] [192.168.2.45] #012NoMethodError (undefined method split' for nil:NilClass):#12 app/models/certificate.rb:46:in parse_metadata'#012 app/controllers/admin/certificates_controller.rb:19:in create'#12 config/initializers/eis_custom_flash.rb:9:in call'

      cn = pc.scan(/\/CN=(.+)/).flatten.first
      self.common_name = cn.split('/').first

UI and system should return error that better communicates that some mandatory piece of info is missing. Ie "CN is missing from the CSR"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant