Hello,

I wanted to suggest a change for parseUri function in Scp.java (and other
files that would be affected from the change).

Basically, the problem I have observed are the same problems mentioned in
Bug-58128 <https://bz.apache.org/bugzilla/show_bug.cgi?id=58128> with the
Scp class. Nowadays, both user names and path names are allowed to include
'@' and ':' characters, which causes parseInt function in Scp class to set
user name, host name, and many other parameters wrong.

The solution I am suggesting is a check for determining if the
user/programmer has already set the values for the class variables that
parseInt function tries to modify before they called "execute" on the Scp
object they created. Mainly, if the username, host name, and either one of
password or key file information are already provided (i.e. the related
fields are already modified) before the call to the "execute" method, then
in the following call to the "parseInt" method caused by "execute",
"parseInt" should treat the passed-in "uri" string as the value of the
remote path itself, and just return it. By this way, we also leverage the
use of "setUsername", "setHost", and "set Password" methods on an instance
of Scp class.

Please let me know if the solution sounds feasible. I can also create a
pull request for this.

Best Regards,
Kerem

-- 
<https://www.cisco.com/c/dam/m/en_us/signaturetool/appdynamics/appd_logo_with_bg.png>


*Kerem Gurbey*

Software Engineer

kerem_gurbey.gur...@appdynamics.com

<https://www.linkedin.com/in/keremgurbey>

Cisco Systems, Inc.

303 Second Street, North Tower

8th

San Francisco

California

94107

United States

This email may contain confidential and privileged material for the sole
use of the intended recipient. Any review, use, distribution or disclosure
by others is strictly prohibited. If you are not the intended recipient (or
authorized to receive for the recipient), please contact the sender by
reply email and delete all copies of this message.

Update Profile <https://engage2demand.cisco.com/LP=6097> - Unsubscribe
<http://demand.cisco.com/unsubscribe?dtid=osscdc000283> - Privacy
<http://www.cisco.com/web/siteassets/legal/privacy.html>

Please click here
<http://www.cisco.com/c/en/us/about/legal/terms-sale-software-license-agreement/company-registration-information.html>
for Company Registration

Reply via email to