Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.1.0] External link not found #296

Open
PhidarkMM opened this issue Oct 24, 2023 · 13 comments
Open

[6.1.0] External link not found #296

PhidarkMM opened this issue Oct 24, 2023 · 13 comments

Comments

@PhidarkMM
Copy link

Hello,

We are testing the latest 6.1 version, upgrading from 5.2.

From 5.2 version, we have first upgraded to 6.0, then 6.0.4, and stopped upgrade progression, all external link where not working.
So the we restarted from 5.2, then 6.0, and 6.0.3, and all external links where working.

When we upgrade from 6.0.3 or 6.0.4 to 6.1.1, every external links are also broken, 6.0.3 is the latest version with external links working.

For example:
Guest reset password link
https://ftp-test2.xxxxx.yy/external/reset/16be588d-9721-4c4a-a5da-5bedaf374a88 -> 404 not found

External anonymous share link:
https://ftp-test2.xxxxx.yy/external/anonymous/5761c10f-dd97-4911-9ca3-060793d3ab9f -> 404 not found

New guest link
https://ftp-test2.xxxxx.yy/external/reset/c3a567fe-349a-40dc-8ebb-f833667a4134 -> 404 not found

Best regards,

@PhidarkMM
Copy link
Author

We also tried to upgrade from 6.0.0, then 6.0.2 and 6.1.0, same result, external links are OK in 6.0.2 (we don't have the bug with the external links corrected in 6.0.3) but not in 6.1.0

@IxFail
Copy link

IxFail commented Oct 27, 2023

@wboudiche
Copy link
Contributor

Hi
check links in config file
linshare.user.url.download.receivedshares=/files/received?fileUuid=%1$s
linshare.user.url.fragment.param.file.uuid=&fileUuid=%1$s
linshare.user.url.download.documents=/files/list?fileUuid=%1$s
linshare.user.url.anonymousurl.link=/external/anonymous/
linshare.user.url.guest.reset=/external/reset/%1$s
linshare.user.url.workgroup.link=/sharedspace/workgroups/%1$s
linshare.user.url.workgroup.folder.link=/sharedspace/workgroups/%1$s/%2$s/%3$s/%4$s
linshare.user.url.workgroup.document.link=/sharedspace/workgroups/%1$s/%2$s/%3$s/%4$s?fileUuid=%5$s
linshare.user.url.workspace.link=/sharedspace/workspace/%1$s
linshare.user.url.download.uploadrequests.entries=/#!/uploadrequests/list?fileUuid=%1$s
linshare.user.url.download.uploadrequests.upload.file=/#!/upload_request_groups/%1$s/upload_requests/%2$s/entries?entryUuid=%3$s
linshare.user.jwt.token.link=/token
linshare.user.guest.link=/administration/adminguests?guestUuid=%1$s

@PhidarkMM
Copy link
Author

Hello,

@IxFail apache configuration is ok, 6.0.2 version is working

@wboudiche these line where not present in our linshare.properties, but it doesn't change anything:
# Logger names for example used by JMX beans.
linshare.available.loggers=org.linagora.linshare,org.linagora.linshare.ldap,org.linagora.linshare.auth

#### User Download
linshare.user.url.download.receivedshares=/files/received?fileUuid=%1$s
linshare.user.url.fragment.param.file.uuid=&fileUuid=%1$s
linshare.user.url.download.documents=/files/list?fileUuid=%1$s
linshare.user.url.anonymousurl.link=/external/anonymous/
linshare.user.url.guest.reset=/external/reset/%1$s
linshare.user.url.workgroup.link=/sharedspace/workgroups/%1$s
linshare.user.url.workgroup.folder.link=/sharedspace/workgroups/%1$s/%2$s/%3$s/%4$s
linshare.user.url.workgroup.document.link=/sharedspace/workgroups/%1$s/%2$s/%3$s/%4$s?fileUuid=%5$s
linshare.user.url.workspace.link=/sharedspace/workspace/%1$s
linshare.user.url.download.uploadrequests.entries=/#!/uploadrequests/list?fileUuid=%1$s
linshare.user.url.download.uploadrequests.upload.file=/#!/upload_request_groups/%1$s/upload_requests/%2$s/entries?entryUuid=%3$s
linshare.user.jwt.token.link=/token
linshare.user.guest.link=/administration/adminguests?guestUuid=%1$s

linshare.notifications.email.templating.override.readonly.mode=false
linshare.notifications.email.templating.subject.prefix.enable=false
linshare.notifications.email.templating.strict.mode=false

# For production, one day we should test and use strict mode :
# linshare.notifications.email.templating.strict.mode=true

# SafeDetail properties value
safe.detail.country.code=FR
safe.detail.control.key=58
safe.detail.iufsc=LINSHARE

Regards,

@PhidarkMM
Copy link
Author

Any other idea why all external links no longer work for us from version 6.0.4 ?

@wboudiche
Copy link
Contributor

can you send me your apache vhost config

@PhidarkMM
Copy link
Author

PhidarkMM commented Nov 14, 2023

#linshare-ui-user.conf
<Directory /var/www/linshare-ui-user>
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f [OR]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ - [L]
RewriteRule ^ index.html [L]
</Directory>

<VirtualHost linshare-test2.internal.fr:443>
ServerName linshare-test2.internal.fr
DocumentRoot /var/www/linshare-ui-user
SSLCertificateFile /etc/linshare/pki/user/2022_09_linshare-test2.cert.pem
SSLCertificateKeyFile /etc/linshare/pki/user/2022_09_linshare-test2.server.key
SSLEngine on
<Location /linshare>
AuthType GSSAPI
AuthName "Compte du domaine internal.fr"
GssapiCredStore keytab:/var/www/krb5.keytab
GssapiAllowedMech krb5
Require valid-user
GssapiUseSessions On
Session on
SessionCookieName gssapi_session path=/;httponly;secure;
GssapiSessionKey key:OTA4Nj...N2E0YjM0MWU=
ProxyPass http://127.0.0.1:8080/linshare
ProxyPassReverse http://127.0.0.1:8080/linshare
ProxyPassReverseCookiePath /linshare /
RewriteEngine On
RewriteCond %{REMOTE_USER} (.+)@INTERNAL.FR$
RewriteRule . - [E=RU:%1]
RequestHeader set SamAccountName %{RU}e
Header set Cache-Control "max-age=0,no-cache,no-store"
</Location>
ErrorLog /var/log/httpd/linshare-user-error.log
CustomLog /var/log/httpd/linshare-user-access.log combined
</VirtualHost>

<VirtualHost ftp-test2.external.fr:443>
ServerName ftp-test2.external.fr
DocumentRoot /var/www/linshare-ui-user
SSLCertificateFile /etc/linshare/pki/user/2022_09_linshare-test2.cert.pem
SSLCertificateKeyFile /etc/linshare/pki/user/2022_09_linshare-test2.server.key
SSLEngine on
<Location /linshare>
ProxyPass http://127.0.0.1:8080/linshare
ProxyPassReverse http://127.0.0.1:8080/linshare
ProxyPassReverseCookiePath /linshare /
# Workaround to remove httpOnly flag (could also be done with Tomcat)
Header edit Set-Cookie "(JSESSIONID=.); Path." "$1; Path=/"
# For https, you should add Secure flag.
# Header edit Set-Cookie "(JSESSIONID=.); Path." "$1; Path=/; Secure"
#This header is added to avoid the JSON cache issue on IE.
Header set Cache-Control "max-age=0,no-cache,no-store"
</Location>
ErrorLog /var/log/httpd/linshare-user-error.log
CustomLog /var/log/httpd/linshare-user-access.log combined
</VirtualHost>

# Redirect port 80
<VirtualHost :80>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteCond "%{REQUEST_URI}" "!/server-status"
RewriteRule (.
) https://%{SERVER_NAME}/$1 [R,L]
</VirtualHost>

@wboudiche
Copy link
Contributor

Hi,
Move the directory configuration to the virtual host

@PhidarkMM
Copy link
Author

PhidarkMM commented Nov 21, 2023

Hello @wboudiche,

I tried to move the directory conf to the virtual host, but it didn't change anything.

Test versions: 6.0.4 and 6.1.0

6.0.3 received links:
Anonymous link file share: https://ftp-test2.xx.yy/#!/external/anonymous/9fc9f2bc-0455-474b-8abe-969608e5a8fa
Contact link file share: https://ftp-test2.xx.yy/#!/files/received?fileUuid=de6bf7cf-4263-45c7-a346-ea8d4e41460a

6.0.4/6.1.1 received links:
Anonymous link file share: https://ftp-test2.xx.yy/external/anonymous/3cf8d8de-afa7-42c4-9203-238964200468
Contact link file share: https://ftp-test2.xx.yy/files/received?fileUuid=1d2bec1d-e6e5-4d7e-8473-bb4ac782e507

If i try to add /#!/ to 6.0.4/6.1.1 received links are correctly redirected and it works, so i must have missed something in configuration.

Same thing if i change /etc/linshare/linshare.properties links:
linshare.user.url.download.receivedshares=/#!/files/received?fileUuid=%1$s
linshare.user.url.anonymousurl.link=/#!/external/anonymous/

@jonathanh478
Copy link

@PhidarkMM did you ever figure out this issue. I am having the same exact issue with links not found error.

@wboudiche
Copy link
Contributor

can u send the content of the table anonymous_url ?

@jonathanh478
Copy link

@wboudiche here are the contents of the table anonymous_url

linshare=> SELECT * FROM anonymous_url;
(0 rows)

@PhidarkMM
Copy link
Author

PhidarkMM commented Apr 4, 2024

Sorry for the late answer:

#Test platform
linshare=> SELECT * FROM anonymous_url;
(0 rows)

#Production platform
linshare=# SELECT * FROM anonymous_url;
id | url_path | uuid | password
| contact_id
--------+-------------------------+--------------------------------------+----------------------------------------------------------------
------+------------
133134 | /#!/external/anonymous/ | f0b54bed-272d-4dd8-96bc-a789f8fc8099 | {bcrypt}$2a$10$mYsDQP...V5fzN8
2kn8i | 133133
131505 | /#!/external/anonymous/ | f0879fe4-a346-4fa6-ac26-ad76947d65b6 | {bcrypt}$2a$10$vlPbSgDlsrX....380WCqg
Wy0Uy | 131504
131528 | /#!/external/anonymous/ | e7bfadff-1500-4617-a446-acb25c0fb64b | {bcrypt}$2a$10$miJX./U7cg6dMqM.DB...yMGC
a/zTq | 29799
131873 | /#!/external/anonymous/ | 5a870ae3-bed1-4276-a2a9-74d459544325 | {bcrypt}$2a$10$sh5DiWh...sTx3PxdD
Rd3cy | 131872
133138 | /#!/external/anonymous/ | 3ecc89e9-6975-49f7-ac56-096e0f5b58a5 | {bcrypt}$2a$10$gxPAxY8X...An/tBGh/
rFVRi | 133137
133655 | /#!/external/anonymous/ | 7a0d9f14-c9ac-4938-aa43-84b007aae8c0 | {bcrypt}$2a$10$EupbpW...RiWH.9gb9
ETGUS | 133654
(6 rows)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants