Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent NPE when cache service is disabled (#19703) #19783

Merged
merged 2 commits into from
May 25, 2022

Commits on May 22, 2022

  1. Prevent NPE when cache service is disabled (go-gitea#19703)

    Backport go-gitea#19703
    
    The cache service can be disabled - at which point ctx.Cache will be nil
    and the use of it will cause an NPE.
    
    The main part of this PR is that the cache is used for restricting
    resending of activation mails and without this we cache we cannot
    restrict this. Whilst this code could be re-considered to use the db and
    probably should be, I think we can simply disable this code in the case
    that the cache is disabled.
    
    Signed-off-by: Andrew Thornton <art27@cantab.net>
    zeripath committed May 22, 2022
    Configuration menu
    Copy the full SHA
    339688c View commit details
    Browse the repository at this point in the history

Commits on May 25, 2022

  1. Configuration menu
    Copy the full SHA
    d2e6f7a View commit details
    Browse the repository at this point in the history