Did some more tests.
I fired a bundle, created a public page, uploaded a document, secured it and linked it in the public page I just created. Trying to open the document with the guest user leads to the expected behavior ( unauthorized access ) .
This leads me to thing that something must have gone nuts during the upgrade process.
I digged a little into the code :
1
2 DLFileEntry fileEntry = null;
3
4 if (Validator.isNotNull(uuid) && (groupId > 0)) {
5 try {
6 fileEntry = DLFileEntryServiceUtil.getFileEntryByUuidAndGroupId(
7 uuid, groupId);
8
9 folderId = fileEntry.getFolderId();
10 name = fileEntry.getName();
11 }
12 catch (Exception e) {
13 }
14 }
15
16 if (fileShortcutId <= 0) {
17 if (Validator.isNotNull(name)) {
18 fileEntry = DLFileEntryServiceUtil.getFileEntry(
19 groupId, folderId, name);
20
21 title = fileEntry.getTitle();
22 }
23 else if (Validator.isNotNull(title)) {
24 fileEntry = DLFileEntryServiceUtil.getFileEntryByTitle(
25 groupId, folderId, title);
26
27 name = fileEntry.getName();
28 }
29 }
30 else {
31 DLFileShortcut fileShortcut =
32 DLFileShortcutServiceUtil.getFileShortcut(fileShortcutId);
33
34 folderId = fileShortcut.getToFolderId();
35 name = fileShortcut.getToName();
36
37 fileEntry = DLFileEntryLocalServiceUtil.getFileEntry(
38 groupId, folderId, name);
39 }
40
41 if (Validator.isNull(version)) {
42 if (Validator.isNotNull(fileEntry.getVersion())) {
43 version = fileEntry.getVersion();
44 }
45 else {
46 throw new NoSuchFileEntryException();
47 }
48 }
and as far as I can understand ( without debugging ) the problem seems to be that
1
2 fileEntry = DLFileEntryLocalServiceUtil.getFileEntry(
3 groupId, folderId, name);
return a NULL object making the test
1if (Validator.isNotNull(fileEntry.getVersion()))
throw the aforementioned exception
Is there anything I can do to double check the data or do you actually think this is a bug ?
Please sign in to flag this as inappropriate.