server icon indicating copy to clipboard operation
server copied to clipboard

[Bug]: ocs/v2.php/core/navigation/apps?absolute=true returns invalid url

Open camilasan opened this issue 1 year ago • 3 comments

⚠️ This issue respects the following points: ⚠️

Bug description

In Nextcloud 26, with the app nextcloud/external - I have consulted @provokateurin about it - if I request: curl -u user:pwd -X GET 'http://stable26.local/ocs/v2.php/core/navigation/apps?absolute=true' -H "OCS-APIRequest: true"

It returns: <href>http://stable26.local/https://duckduckgo.com</href>

If I request without absolute=true then I get: <href>https://duckduckgo.com</href>

Steps to reproduce

  1. Install the External Sites app
  2. Add 2 urls - somehow, the issue was only reproducible after adding a second link.

Expected behavior

ocs/v2.php/core/navigation/apps?absolute=true should return a valid url in href.

Installation method

Community Docker image

Nextcloud Server version

26

Operating system

Debian/Ubuntu

PHP engine version

Other

Web server

Nginx

Database engine version

None

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • [ ] Default user-backend (database)
  • [ ] LDAP/ Active Directory
  • [ ] SSO - SAML
  • [X] Other

Configuration report

No response

List of activated Apps

No response

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

No response

camilasan avatar Jan 30 '24 11:01 camilasan

@come-nc I'm uncertain if the issue is on the external_sites app itself or if it's a server/core issue. What do you think?

sorbaugh avatar Jan 30 '24 14:01 sorbaugh

I had a look at the code in the external app and it adds the href as-is to the navigation entries. It should be verified that this also is received correctly on the server site, but I'm pretty sure it is.

provokateurin avatar Jan 30 '24 14:01 provokateurin

I had a look at the code in the external app and it adds the href as-is to the navigation entries. It should be verified that this also is received correctly on the server site, but I'm pretty sure it is.

Yes then it sounds like a server/core issue

sorbaugh avatar Jan 30 '24 14:01 sorbaugh