import org.apache.commons.logging.LogFactory;
import org.argeo.cms.CmsException;
import org.argeo.cms.KernelHeader;
import org.apache.commons.logging.LogFactory;
import org.argeo.cms.CmsException;
import org.argeo.cms.KernelHeader;
import org.argeo.osgi.useradmin.UserDirectoryException;
import org.osgi.framework.InvalidSyntaxException;
import org.osgi.service.useradmin.Authorization;
import org.argeo.osgi.useradmin.UserDirectoryException;
import org.osgi.framework.InvalidSyntaxException;
import org.osgi.service.useradmin.Authorization;
- if (uri.startsWith("/"))
- u = new File(uri).getAbsoluteFile().toURI();
+ if (uri.startsWith("/") || uri.startsWith("./")
+ || uri.startsWith("../"))
+ u = new File(uri).getCanonicalFile().toURI();
throw new CmsException("Invalid base dn for node roles");
// TODO deal with "mounted" roles with a different baseDN
}
throw new CmsException("Invalid base dn for node roles");
// TODO deal with "mounted" roles with a different baseDN
}
if (userAdmins.get(name) instanceof UserDirectory) {
UserDirectory userDirectory = (UserDirectory) userAdmins
.get(name);
if (userAdmins.get(name) instanceof UserDirectory) {
UserDirectory userDirectory = (UserDirectory) userAdmins
.get(name);