tridentli / pitchfork

Golang framework for secure communication platforms.
Apache License 2.0
5 stars 3 forks source link

Normalize Boolean in HandleCmd #98

Open massar opened 7 years ago

massar commented 7 years ago

After 'Mask arguments that should not be logged' for password/twofactor/keyring also add support for normalizing booleans:

+                               case "bool":
+                                       /* Field not given - then it is off */
+                                       if val == "" {
+                                               val = "off"
+                                       }
+
+                                       /* Normalize the Boolean */
+                                       val = pf.NormalizeBoolean(val)
+                                       break
+