Skip to content

Comments

Fix improperly formatted FTP URL in jail break FTP servers#1495

Merged
niveathika merged 13 commits intoballerina-platform:masterfrom
SachinAkash01:jailed-home-url
Sep 24, 2025
Merged

Fix improperly formatted FTP URL in jail break FTP servers#1495
niveathika merged 13 commits intoballerina-platform:masterfrom
SachinAkash01:jailed-home-url

Conversation

@SachinAkash01
Copy link
Member

@SachinAkash01 SachinAkash01 commented Sep 23, 2025

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

  • Linked to an issue
  • Updated the changelog
  • Added tests
  • Updated the spec
  • Checked native-image compatibility

@codecov
Copy link

codecov bot commented Sep 23, 2025

Codecov Report

❌ Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 83.56%. Comparing base (9370652) to head (7100872).
⚠️ Report is 14 commits behind head on master.

Files with missing lines Patch % Lines
...ain/java/io/ballerina/stdlib/ftp/util/FtpUtil.java 87.50% 0 Missing and 1 partial ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@niveathika niveathika requested a review from Copilot September 24, 2025 01:28
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 normalizeFtpPath method 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.

@sonarqubecloud
Copy link

@niveathika niveathika added the Skip GraalVM Check This will skip the GraalVM compatibility check label Sep 24, 2025
@niveathika niveathika merged commit 922c974 into ballerina-platform:master Sep 24, 2025
8 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Skip GraalVM Check This will skip the GraalVM compatibility check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FTP URL is Improperly Formatted for Jail Break FTP Servers

2 participants