qubitrenegade / certbot-exec

MIT License
2 stars 1 forks source link

Validate Server attribute #1

Open qubitrenegade opened 5 years ago

qubitrenegade commented 5 years ago

https://github.com/qubitrenegade/certbot-exec/blob/d243d5e229d099dd8b6bf5a2849341e3d9143530/libraries/helpers.rb#L28-L30

Only two valid values are prod and stage. (e.g: stag causes failure)

Validate this input or handle more flexible values.

qubitrenegade commented 5 years ago
    def cbe_server
     raise error %(your server: "#{cbe['server']}" not eq 'prod' or 'stage') unless cbe_servers
      cbe['acme'][cbe['server']]
    end

(oh, hmm maybe we need cbe_servers())