Skip to content

Non-standard port is lost when opening Nextcloud file links from Talk Description #17650

Description

@sanglas4e-arch

⚠️ Before posting ⚠️

  • This is a bug, not a question or an enhancement.
  • I've searched for similar issues and didn't find a duplicate.
  • I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
  • I agree to follow Nextcloud's Code of Conduct.

Steps to reproduce

When a Nextcloud instance is exposed through a non-standard HTTPS port, links to files shared in Nextcloud Talk are displayed correctly, including the port number.

However, when tapping the link in Talk, the port is lost and the URL is opened on the default HTTPS port 443.

The same URL works correctly when copied from Talk and pasted directly into a web browser.

Server is exposed through HTTPS on a non-standard port: 4446

Server URL
https://example.com:4446

Steps to reproduce

Configure a Nextcloud instance to be accessible at:

https://example.com:4446

Create or obtain a file link, for example:

https://example.com:4446/index.php/f/12345

Send this link in a Nextcloud Talk conversation.

In Talk, the link is displayed correctly with the port:

https://example.com:4446/index.php/f/12345

Tap the link.

Expected behaviour

Expected behavior

The link should be opened using the original URL, including the non-standard port:

https://example.com:4446/index.php/f/12345

Actual behaviour

When the link is opened from Talk, the port is lost and the resulting URL uses the default HTTPS port:

https://example.com/index.php/f/12345
The connection therefore goes to port 443 instead of 4446.

Important observation

If the URL is copied from Talk and pasted manually into Chrome/Firefox on the same Android device, it works correctly:

https://example.com:4446/index.php/f/12345

This indicates that the server, reverse proxy and URL itself are working correctly.

The problem only occurs when the link is opened by tapping it inside Talk.

Android version

14

Device brand and model

Xaiomi

Stock or custom OS?

Stock

Nextcloud android app version

24.0.4

Nextcloud server version

34.1.1

Using a reverse proxy?

I don't know

Android logs

No response

Server error logs

Additional information

Possible relation to Nextcloud Android

This may be related to #12989, which describes problems with Nextcloud Android when using a server on a non-standard port.

Talk appears to recognize internal Nextcloud file links and hand them over to the Nextcloud Android application/file viewer rather than simply opening the original URI in the browser.

It would therefore be useful to check whether the port is being dropped while Talk hands the URL to Nextcloud Android, or while Nextcloud Android reconstructs the server URL from the configured account.

Additional information

The behavior can be summarized as:

Talk message

https://example.com:4446/index.php/f/12345
↓ tap
Nextcloud/Talk Android link handling

https://example.com/index.php/f/12345

port 443

Whereas:

Copy URL from Talk

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugneeds infoWaiting for info from user(s). Issues with this label will auto-stale.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions