What was fixed
`SessionInterface.get_cookie_path` could return `None` when both
`SESSION_COOKIE_PATH` and `APPLICATION_ROOT` were unset, causing the
session cookie to be scoped only to the current request path and
breaking session persistence across routes.
### How it was fixed
The method now:
1. Checks `SESSION_COOKIE_PATH`.
2. Falls back to `APPLICATION_ROOT`.
3. Defaults to `/` if both are `None`.
This guarantees the session cookie is always issued with a valid path,
ensuring reliable session handling throughout the application.Fix session cookie path resolution
What was fixed
`SessionInterface.get_cookie_path` could return `None` when both
`SESSION_COOKIE_PATH` and `APPLICATION_ROOT` were unset, causing the
session cookie to be scoped only to the current request path and
breaking session persistence across routes.
### How it was fixed
The method now:
1. Checks `SESSION_COOKIE_PATH`.
2. Falls back to `APPLICATION_ROOT`.
3. Defaults to `/` if both are `None`.
This guarantees the session cookie is always issued with a valid path,
ensuring reliable session handling throughout the application.
Co-Authored-By: S. M. Mohiuddin Khan Shiam <147746955+mohiuddin-khan-shiam@users.noreply.github.com>
When the 'flask' command is used with only the '--help' parameter, this
change will make sure to try and load the app before the help callback
is run. This was previously only being done when the 'flask' command was
used by itself. This meant when passing in '--help', any custom commands
were not getting shown in the help message. With this change, custom
commands will be included in the help message when running 'flask' on
the command line by itself or with the '--help' parameter.