• David Fernandez's avatar
    Validate regex before using `CleanupContainerRepositoryWorker` · 3ed2efb3
    David Fernandez authored
    Three guards have been added:
    1. The service used by the worker will not raise an error
    upon receiving an invalid regex but it will return an error
    response
    2. The expiration container policy will not schedule the
    next run for the given container expiration policy if it is
    valid. In addition, the given container expiration policy
    will be disabled
    3. Added a new UntrustedRegexp validator for Grape APIs.
    This one has been used in `API::ProjectContainerRepositories` to prevent
    enqueuing a job with invalid regex
    3ed2efb3
container_expiration_policy_worker.rb 796 Bytes