Skip to content

Commit

Permalink
small fix to correct the FileServlet authentication exception (which …
Browse files Browse the repository at this point in the history
…was preventing the image upload and retrieval from working) and correction to the ProfileManager for retrieving Profiles when ACL rules are not set
  • Loading branch information
Diana Cheng committed Aug 16, 2010
1 parent 3302b6e commit 4464349
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Expand Up @@ -88,6 +88,10 @@ public Profile getProfile(String requestorJID, String targetJID) throws UserNotF
{
boolean canSee=false;
List<AclRule> rules= field.getAclRules();
//this is a patch, so that the profile and its fields can be retrieved even when the acl rules where not set...
// currently the vodafonernd.com DB has many profiles without any ACL rules, which retrieves empty profiles...
if (rules.isEmpty())
canSee=true;
for (AclRule rule: rules)
{
if ((rule.hasAction(viewAction)) && (AclManager.canSee(targetJID, rule, requestorJID)))
Expand Down
8 changes: 6 additions & 2 deletions src/java/org/onesocialweb/openfire/web/FileServlet.java
Expand Up @@ -218,8 +218,12 @@ public void init(ServletConfig config) throws ServletException {
super.init(config);

// Exclude this servlet from requering the user to login
AuthCheckFilter.addExclude("osw-openfire-plugin");
}
AuthCheckFilter.addExclude("osw-openfire-plugin");
AuthCheckFilter.addExclude("osw-openfire-plugin/file/");
AuthCheckFilter.addExclude("osw-openfire-plugin/form.html");


}

private File getTempFolder() {
final String tempPath = JiveGlobals.getProperty("onesocialweb.path.temp");
Expand Down

0 comments on commit 4464349

Please sign in to comment.