Permission Analysis Report


Analysis of: org.eclipse.jface

Detail

Class: org.eclipse.jface.preference.FileFieldEditor (Application)
DoPrivileged location: Line# 81 java.lang.String changePressed( )
Permission: java.io.FilePermission "", "read"
Primordial/boolean java.io.File.exists( )


CODE
protected String changePressed() {
File f = new File(getTextControl().getText());
if (!f.exists())
f = null;
File d = getFile(f);
if (d == null)
return null;

return d.getAbsolutePath();
}
Tainted variable reference trace:

Permission Requirements:



Conclusion:

Grant the permission to this plug-in via OSGI-INF/Permissions.perm file - fine acccess control.

DoPrivileged location: Line# 87 java.lang.String changePressed( )
Permission: java.io.FilePermission "???file???", "read"
Primordial/java.lang.String java.io.File.getAbsolutePath( )
Permission: java.util.PropertyPermission "user.dir", "read"
Primordial/java.lang.String java.io.File.getAbsolutePath( )


CODE
protected String changePressed() {
File f = new File(getTextControl().getText());
if (!f.exists())
f = null;
File d = getFile(f);
if (d == null)
return null;

return d.getAbsolutePath();
}
Tainted variable reference trace:

Permission Requirements:



Conclusion:

See prior conclusion.

DoPrivileged location: Line# 108 boolean checkState( )
Permission: java.io.FilePermission "", "read"
Primordial/boolean java.io.File.isFile( )


CODE
protected boolean checkState() {

String msg = null;

String path = getTextControl().getText();
if (path != null)
path = path.trim();
else
path = "";//$NON-NLS-1$
if (path.length() == 0) {
if (!isEmptyStringAllowed())
msg = getErrorMessage();
} else {
File file = new File(path);
if (file.isFile()) {
if (enforceAbsolute && !file.isAbsolute())
msg = JFaceResources
.getString("FileFieldEditor.errorMessage2");//$NON-NLS-1$
} else {
msg = getErrorMessage();
}
}

if (msg != null) { // error
showErrorMessage(msg);
return false;
}

// OK!
clearErrorMessage();
return true;
}

Tainted variable reference trace:

Permission Requirements:



Conclusion:

See prior conclusion.