[Freeipa-devel] [freeipa PR#436][comment] x509: allow leading text in PEM files
URL: https://github.com/freeipa/freeipa/pull/436 Title: #436: x509: allow leading text in PEM files HonzaCholasta commented: """ Fixed upstream master: https://fedorahosted.org/freeipa/changeset/89dfbab3ca076812590f371c21abcb51b350170b """ See the full comment at https://github.com/freeipa/freeipa/pull/436#issuecomment-277687144 -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
[Freeipa-devel] [freeipa PR#436][comment] x509: allow leading text in PEM files
URL: https://github.com/freeipa/freeipa/pull/436 Title: #436: x509: allow leading text in PEM files tiran commented: """ Yes, please keep the test. It should pass with the current regular expression, too. """ See the full comment at https://github.com/freeipa/freeipa/pull/436#issuecomment-277665259 -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
[Freeipa-devel] [freeipa PR#436][comment] x509: allow leading text in PEM files
URL: https://github.com/freeipa/freeipa/pull/436 Title: #436: x509: allow leading text in PEM files HonzaCholasta commented: """ Oops, didn't realize that `^` matches beginning of each line in multiline mode. I think we can keep the test, though. """ See the full comment at https://github.com/freeipa/freeipa/pull/436#issuecomment-277663630 -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code
[Freeipa-devel] [freeipa PR#436][comment] x509: allow leading text in PEM files
URL: https://github.com/freeipa/freeipa/pull/436 Title: #436: x509: allow leading text in PEM files tiran commented: """ NACK The ^ is correct because the regular expression must search for a line that starts with ```-BEGIN CERTIFICATE-```. I cannot reproduce the issue locally. The regexp matches a cert with leading text: ``` >>> import re >>> regexp = u"^-BEGIN CERTIFICATE-(.*?)-END CERTIFICATE-" >>> pem = u"leading line\n-BEGIN CERTIFICATE-\nabcd\n-END >>> CERTIFICATE-\ntrailing text" >>> re.search(regexp, pem, re.MULTILINE | re.DOTALL) <_sre.SRE_Match object at 0x7f667778d0a8> >>> re.search(regexp, pem, re.MULTILINE | re.DOTALL).group(1) u'\nabcd\n' ``` """ See the full comment at https://github.com/freeipa/freeipa/pull/436#issuecomment-277661149 -- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code