| Summary: | Connection name with ":" causes problems | ||
|---|---|---|---|
| Product: | [Tools] Target Management | Reporter: | Masao Nishimoto <e03616> |
| Component: | RSE | Assignee: | David McKnight <dmcknigh> |
| Status: | RESOLVED FIXED | QA Contact: | Martin Oberhuber <mober.at+eclipse> |
| Severity: | normal | ||
| Priority: | P3 | CC: | dmcknigh, immaneni, kjdoyle |
| Version: | 3.2.2 | Flags: | kjdoyle:
review+
|
| Target Milestone: | 3.3.1 | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 357479, 353434 | ||
| Attachments: | |||
|
Description
Masao Nishimoto
Created attachment 200599 [details]
patch to account for colon in connection name
Masao, could you try with this patch?
I'm assuming you'll need a RSE 3.2.x backport for this, so I opened bug 353434 for the backport. The patch solved the problem of saving a remote file. Another problem: When I created stplex4b:4035 and ctfmvs08:4035, and restarted the workbench, the first connection, stplex4b:4035, does not appear in the Remote Systems view. Is it acceptable to reject a host name and a connection name that cannot be a part of a file path as a short term solution? It is ok to have that restriction only in RSE 3.2.x. The patch has a side effect. It causes drag and drop from Local Files not to work. When the input for SystemViewDataDropAdapter.getObjectFor(String) is NISHIMOTO.Local:local.files:C:\Documents and Settings\Administrator\COPY11.cpy subsystemId becomes NISHIMOTO.Local:local.files:C. Created attachment 200845 [details]
patch to not allow ':' in connection name for connection wizard
This alternative patch prevents users from creating a connection that has ':' in the connection name. The patch allows for hostnames that have ':' (IPv6 will use ':' in it's addresses so I think we still need to support that case) but adds a file name validator for the connection names. When the connection wizard tries to prefill the connection name with the hostname, it will augment any ':' with '_'. Masao, could you try with this patch?
Tried the patch to not allow colon in the connection name for connection wizard (attachment 200845 [details]) and it works as expected.
1. When ever the user enters a connection name with any of the characters like \ / : * ? " < > | then a valid error message is displayed and the user is not allowed to specify an invalid connection name.
2. In case if the user specifies a host name with colons (IPv6 address - example 9:1:2:3) then the connection name gets suggested with colons being replaced with underscores (example 9_1_2_3).
Thanks for providing the fix.
Xuan, could you please review this patch? Kevin, could you please review this patch? Review +. Thanks for the review, Kevin. I've committed the change to cvs. I verified that also on SSH connections, when the connection name has a ":" files can't be saved. Personally I'd prefer fixing the problem rather than working around it (eg by quoting connection names like we already do when writing files to disk), but I can also live with the workaround. If our choice is to disallow connections with a ":" in the name, then the rename dialog should also be changed. I filed bug 357479 for this. The current fix doesn't account for non-windows cases where ':' can be a valid file name character. Reopening this in order to provide a solution that will also work on linux clients. Created attachment 203354 [details]
updated patch to handle ':' when using non-Windows client
Masao, can you see if the updated patch helps cases where users are on a linux client? I'm going to leave this resolved for now. Masao, if you require a fix that will work on a Linux client please open a separate defect referencing this one. David, did you apply your patch to handle ':' when using non-Windows client, so that its available when we pick up the next RSE version ? (In reply to comment #17) > David, did you apply your patch to handle ':' when using non-Windows client, so > that its available when we pick up the next RSE version ? Pavan, no, I haven't applied the patch. Since the original fix was already resolved and put in RSE builds and we've already passed SR1, I think it's better to handle the Linux-case via a separate bug. |