Unverified Commit bf69298d authored by Felix Bargfeldt's avatar Felix Bargfeldt Committed by GitHub
Browse files

nixos/tor: allow only valid names in the Nickname option (#396009)

parents 150301e7 88b69de5
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1055,7 +1055,11 @@ in
          options.MaxClientCircuitsPending = optionInt "MaxClientCircuitsPending";
          options.NATDPort = optionIsolablePorts "NATDPort";
          options.NewCircuitPeriod = optionInt "NewCircuitPeriod";
          options.Nickname = optionString "Nickname";
          options.Nickname = lib.mkOption {
            type = with lib.types; nullOr (strMatching "^[a-zA-Z0-9]{1,19}$");
            default = null;
            description = (descriptionGeneric "Nickname");
          };
          options.ORPort = optionORPort "ORPort";
          options.OfflineMasterKey = optionBool "OfflineMasterKey";
          options.OptimisticData = optionBool "OptimisticData"; # default is null and like "auto"