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

Check Mirror exists before linking its Repo #20840

Merged

Commits on Aug 17, 2022

  1. Check Mirror exists before linking its Repo

    In MirrorRepositoryList.loadAttributes there is some code to load the Mirror entries
    from the database. This assumes that every Repository which has IsMirror set has
    a Mirror associated in the DB. This association is incorrect in the case of
    Mirror repository under creation when there is no Mirror entry in the DB until
    completion.
    
    Unfortunately LoadAttributes makes this incorrect assumption and presumes that a
    Mirror will always be loaded. This then causes a panic.
    
    This PR simply double checks if there a Mirror before attempting to link back to
    its Repo. Unfortunately it should be expected that there may be other cases where
    this incorrect assumption causes further problems.
    
    Fix go-gitea#20804
    
    Signed-off-by: Andrew Thornton <[email protected]>
    zeripath committed Aug 17, 2022
    Configuration menu
    Copy the full SHA
    9bacd90 View commit details
    Browse the repository at this point in the history

Commits on Aug 18, 2022

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