The vulnerability lies in the is_safe_url function, which is responsible for validating URLs to prevent open redirects. The provided patch from commit 0d305b5cad08f4bcbd8da08dfeab58741b4e8bdf directly addresses this issue by adding a check for URLs that start with //, /\, \/, or \\. The commit message, "Updates the is_url_safe method to reject urls with ///", further confirms that this change is the security fix. The vulnerability allowed authenticated users to be redirected to an attacker-controlled domain because the is_safe_url function failed to properly sanitize the next parameter in the login redirect route. The other commits in the pull request are related to tests, documentation, and other features, but the core vulnerability is fixed in the is_safe_url function.