This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 114863 - Avoid java.io.File.getCanonicalFile() in ModuleUpdater
Summary: Avoid java.io.File.getCanonicalFile() in ModuleUpdater
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Autoupdate (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jiri Rechtacek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-06 11:04 UTC by Jiri Rechtacek
Modified: 2007-09-07 14:36 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Rechtacek 2007-09-06 11:04:35 UTC
ModuleUpdater calls File.getCanonicalFile() it can be risky on unix systems. ModuleUpdater should track file's
collection an another way, e.g. file names or hold original file only.

------- Additional comments from jglick@netbeans.org Wed Sep  5 15:44:48 +0000 2007 -------
Was this the patch that added a call to File.getCanonicalFile()? Be careful with this method. On Unix it can cause
symlink targets to "leak" into the rest of the system in an undesirable way. Best to use FileUtil.normalizeFile when
available (I know it is not available in updater.jar).
Comment 1 Jiri Rechtacek 2007-09-07 14:36:31 UTC
Checking in src/org/netbeans/modules/autoupdate/services/InstallSupportImpl.java;
/shared/data/ccvs/repository/autoupdate/services/src/org/netbeans/modules/autoupdate/services/InstallSupportImpl.java,v
 <--  InstallSupportImpl.java
new revision: 1.25; previous revision: 1.24
done
Checking in libsrc/org/netbeans/updater/ModuleUpdate.java;
/shared/data/ccvs/repository/autoupdate/services/libsrc/org/netbeans/updater/ModuleUpdate.java,v  <--  ModuleUpdate.java
new revision: 1.3; previous revision: 1.2
done
Checking in libsrc/org/netbeans/updater/ModuleUpdater.java;
/shared/data/ccvs/repository/autoupdate/services/libsrc/org/netbeans/updater/ModuleUpdater.java,v  <--  ModuleUpdater.java
new revision: 1.12; previous revision: 1.11
done
Checking in libsrc/org/netbeans/updater/UpdaterFrame.java;
/shared/data/ccvs/repository/autoupdate/services/libsrc/org/netbeans/updater/UpdaterFrame.java,v  <--  UpdaterFrame.java
new revision: 1.5; previous revision: 1.4
done
Checking in libsrc/org/netbeans/updater/UpdateTracking.java;
/shared/data/ccvs/repository/autoupdate/services/libsrc/org/netbeans/updater/UpdateTracking.java,v  <--  UpdateTracking.java
new revision: 1.9; previous revision: 1.8
done