Repository navigation
Handle FTP gallery endpoints, credentials and failed connections - #1685
Merged
Merged
Conversation
Owner
|
Can you rebase from main for this and other PRs? I updated python version to 3.9. |
Afloat16
force-pushed
the
fix/ftp-gallery-connections
branch
2 times, most recently
from
November 9, 2026 12:43
e0afe8e to
bcd6dd0
Compare
Afloat16
force-pushed
the
fix/ftp-gallery-connections
branch
from
November 9, 2026 12:45
bcd6dd0 to
70e5224
Compare
Flask 3 supplies Werkzeug Headers to the API routes. Include that existing input alongside the dictionary used by gRPC in the validate annotation. Keep the optional header type under TYPE_CHECKING. Verified the six mypy errors on the unchanged base. With this annotation, all 144 source files pass mypy 1.14.1 under both Flask 3.1.3 and Flask 2.0.2. Pylint scores 10.00/10, the existing token-validation tests pass in both environments, and dictionary, Headers and EnvironHeaders checks cover valid, absent, invalid and disabled authentication.
Afloat16
force-pushed
the
fix/ftp-gallery-connections
branch
from
November 9, 2026 12:54
70e5224 to
7d514e9
Compare
serengil
approved these changes
Nov 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What has been done
Gallery URIs now bracket IPv6 hosts and reject a different port on the same host. Endpoint validation errors omit supplied credentials. Decode credentials from a URI while keeping percent sequences in environment-provided usernames and passwords literal. Clean up FTP sockets when a cached connection fails its health check or a replacement cannot connect or log in. During existence checks, propagate authentication and unsupported-command errors while retaining the existing 550 file-unavailable behavior.
How to test
python -m pytest -q tests/unit/test_ftp_connection.py tests/unit/test_ftp_path_encoding.py tests/unit/test_filestore.pypassed all 22 cases on Python 3.12. The eight new cases fail on base a8cee7b. A loopback FTP server also exercised percent-containing credentials, listing, reading, and checking present and absent files.