Skip to content

Commit

Permalink
fix: NPE for ACEs check on samba share without NT rights
Browse files Browse the repository at this point in the history
  • Loading branch information
jgribonvald committed Apr 19, 2023
1 parent bf1a52a commit 9e31d20
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -258,11 +258,13 @@ private JsTreeFile resourceAsJsTreeFile(SmbFile resource, SharedUserPortletParam
if (!resourceWritable) {
try {
ACE[] ACEs = resource.getSecurity();
for(ACE ace: ACEs) {
if (this.userAuthenticator.getUsername().equals(ace.getSID().getAccountName())) {
if ((ace.getAccessMask() & ACE.FILE_WRITE_DATA)!=0) {
resourceWritable = true;
break;
if (ACEs != null) {
for (ACE ace : ACEs) {
if (this.userAuthenticator.getUsername().equals(ace.getSID().getAccountName())) {
if ((ace.getAccessMask() & ACE.FILE_WRITE_DATA) != 0) {
resourceWritable = true;
break;
}
}
}
}
Expand Down

0 comments on commit 9e31d20

Please sign in to comment.