iOS app can't login to self-hosted Nextcloud instance behind WAF
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 2.5k
- Forks
- 1k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 13
Description
On self-hosted Nextcloud server instance that is behind WAF, the iOS application can't login.
The reason is that the iOS app seems to send the request using the IP of the self-hosted instance instead of the FQDN, thus, the WAF blocks the connection as it doesn't allow requests via IP, it only allows FQDN requests.
Of course in the iOS app, we put the FQDN of the instance and not the IP.
This issue doesn't exist on the android app version.
How to use GitHub
- Please use the 👍 reaction to show that you are affected by the same issue.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Steps to reproduce
- Put the FQDN address of the self-hosted instance
Expected behaviour
The iOS application should login as expected.
Actual behaviour
The application can't login and throws a connection error popup.
Logs
iOS app doesn't provide any debug logs.
Logs from WAF that is in front of Nextcloud instance informs that the host header reports the instance IP and not the actual hostname, thus, blocking the request.
For example:
In the header of the request it shows:
Host: 'IP-address'
Instead, the Host header should include the actual FQDN of the nextcloud instance
Reasoning or why should it be changed/implemented?
IP-Addresses instead hostnames are not supported in WAF (at least in our implementation).
The iOS app needs to send the actual hostname instead of instance IP.
The android client app works as expected.
Environment data
iOS version: 26.2.1
Nextcloud iOS app version: 7.2.3
Server operating system: debian 12 (bookworm)
Web server: nginx
Database: mariadb
PHP version: 8.3.30
Nextcloud version: Nextcloud Hub 10 (31.0.13)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the login with an FQDN against a self-hosted Nextcloud instance behind a WAF, then inspect the request's Host header and compare it with the reported IP value. Done means the iOS app sends the configured FQDN and login succeeds without the WAF blocking the connection.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, swift
- Domain
- mobile-dev, networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100