cisagov / gophish-tools

Helpful tools for interacting with a GoPhish phishing instance
Creative Commons Zero v1.0 Universal
42 stars 6 forks source link

Add check to ensure supplied campaign launch/complete times are valid #56

Closed JCantu248 closed 3 years ago

JCantu248 commented 3 years ago

๐Ÿ—ฃ Description

Some validation has been provided to ensure that the supplied launch/complete times for a campaign are sane, in that they do not occur before the current time.

๐Ÿ’ญ Motivation and context

During development of some previous tickets, it was found that a user could supply aforementioned values before the current time. Gophish-tools would then schedule the campaigns as indicated, and Gophish would automatically close them if the complete date was prior to the current time. This is not desirable behavior from our operators.

๐Ÿงช Testing

Testing of the new changes was done by attempting to schedule a campaign with a date prior to the current time, such as 1/1/1901 12:00. An error message is displayed until valid input is provided.

๐Ÿ“ท Screenshots (if appropriate)

โœ… Checklist

JCantu248 commented 3 years ago

@dav3r @jsf9k When you guys have time available, could you review this PR?

Thanks,

JCantu248 commented 3 years ago

If we are all good, we can merge this at your convenience