Fix improperly formatted FTP URL in jail break FTP servers#1495
Fix improperly formatted FTP URL in jail break FTP servers#1495niveathika merged 13 commits intoballerina-platform:masterfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1495 +/- ##
============================================
- Coverage 84.83% 83.56% -1.27%
- Complexity 241 341 +100
============================================
Files 28 37 +9
Lines 1286 1637 +351
Branches 155 238 +83
============================================
+ Hits 1091 1368 +277
- Misses 133 165 +32
- Partials 62 104 +42 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull Request Overview
This PR fixes improper FTP URL formatting in jail break scenarios by ensuring relative paths are properly prefixed with a forward slash. In jail break FTP servers, paths are relative and were missing the required forward slash prefix.
- Added a
normalizeFtpPathmethod to handle path normalization for FTP URLs - Enhanced test coverage with new test cases for relative paths in jailed environments
- Updated version numbers across configuration files
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| native/src/main/java/io/ballerina/stdlib/ftp/util/FtpUtil.java | Implements path normalization logic to fix FTP URL formatting |
| ballerina/tests/client_endpoint_test.bal | Adds comprehensive test cases for jailed FTP scenarios with relative paths |
| changelog.md | Documents the bug fix |
| ballerina/Dependencies.toml | Updates package version |
| ballerina/CompilerPlugin.toml | Updates compiler plugin dependency path |
| ballerina/Ballerina.toml | Updates package and native dependency versions |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|



Purpose
This PR will fix the improperly formatted FTP URL in jail break FTP servers. In jail break scenarios, the path is relative. Due to this, the forward slash (
/) will be missed in the path.Fixes: ballerina-platform/ballerina-library#8267
Related issue: ballerina-platform/ballerina-library#8153
Examples
Checklist