Gavin Panella has proposed merging lp:~allenap/maas/omshell-paranoia into 
lp:maas.

Commit message:
The code that chooses a key to use with omshell is more paranoid again.

This reverts a reversion made in r1202. It's demonstrably possible to confuse 
omshell with a particular *three*-character sequence. This code may be over 
paranoid, but it's better than not paranoid enough, until we can figure out the 
exact pattern that triggers the bug in omshell.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~allenap/maas/omshell-paranoia/+merge/128552
-- 
https://code.launchpad.net/~allenap/maas/omshell-paranoia/+merge/128552
Your team Launchpad code reviewers is requested to review the proposed merge of 
lp:~allenap/maas/omshell-paranoia into lp:maas.
=== modified file 'src/provisioningserver/omshell.py'
--- src/provisioningserver/omshell.py	2012-10-08 03:37:26 +0000
+++ src/provisioningserver/omshell.py	2012-10-08 17:33:24 +0000
@@ -32,7 +32,7 @@
 from provisioningserver.utils import parse_key_value_file
 
 
-bad_key_pattern = re.compile("[+/]no[+/]", flags=re.IGNORECASE)
+bad_key_pattern = re.compile("[+/]no|no[+/]", flags=re.IGNORECASE)
 
 
 def call_dnssec_keygen(tmpdir):

=== modified file 'src/provisioningserver/tests/test_omshell.py'
--- src/provisioningserver/tests/test_omshell.py	2012-10-08 03:37:26 +0000
+++ src/provisioningserver/tests/test_omshell.py	2012-10-08 17:33:24 +0000
@@ -212,8 +212,8 @@
 
     def test_run_repeated_keygen(self):
         bad_patterns = {
-            "+no/", "/no/", "/no+", "+no+",
-            "+NO/", "/NO/", "/NO+", "+NO+",
+            "+no", "/no", "no+", "no/",
+            "+NO", "/NO", "NO+", "NO/",
             }
         bad_patterns_templates = {
             "foo%sbar", "one\ntwo\n%s\nthree\n", "%s",

_______________________________________________
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp

Reply via email to