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

MalformedUriException Unable to parse URI: https:///custom_apps/mail/img/blocked-image.png #10536

Open
0-wHiTeHand-0 opened this issue Dec 30, 2024 · 0 comments

Comments

@0-wHiTeHand-0
Copy link

0-wHiTeHand-0 commented Dec 30, 2024

Steps to reproduce

Just open an email, but it does not occur with all of them. This error does not cause any problem for reading emails, but some component is adding an additional slash to the URL, which should not happen. Checked on two different NC instances I have.

Expected behavior

The browser makes a requests to:
/apps/mail/proxy?src=https%3A%2F%2Fcustom_apps%2Fmail%2Fimg%2Fblocked-image.png&requesttoken=<TOKEN>
(note the 2 %2F (slash) after the 'https' -> not malformed url)

Actual behavior

The browser makes requests to:
/apps/mail/proxy?src=https%3A%2F%2F%2Fcustom_apps%2Fmail%2Fimg%2Fblocked-image.png&requesttoken=<TOKEN>
(note the 3 %2F (slash) after the 'https' -> malformed url)

Mail app version

4.1.1

Nextcloud version

30.0.4 - aio

Mailserver or service

hostinger

Operating system

Linux

PHP engine version

PHP 8.2

Nextcloud memory caching

local -> APCu , distributed -> Redis

Web server

Nginx

Database

PostgreSQL

Additional info

Here's the complete trace:

MalformedUriException Unable to parse URI: https:///custom_apps/mail/img/blocked-image.png
Raw log entry

{
  "reqId": "________",
  "level": 3,
  "time": "2024-12-20T11:41:02+00:00",
  "remoteAddr": "________",
  "user": "________",
  "app": "index",
  "method": "GET",
  "url": "/apps/mail/proxy?src=https%3A%2F%2F%2Fcustom_apps%2Fmail%2Fimg%2Fblocked-image.png&requesttoken=________",
  "message": "Unable to parse URI: https:///custom_apps/mail/img/blocked-image.png",
  "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:133.0) Gecko/20100101 Firefox/133.0",
  "version": "30.0.4.1",
  "exception": {
    "Exception": "GuzzleHttp\\Psr7\\Exception\\MalformedUriException",
    "Message": "Unable to parse URI: https:///custom_apps/mail/img/blocked-image.png",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/html/3rdparty/guzzlehttp/psr7/src/Utils.php",
        "line": 472,
        "function": "__construct",
        "class": "GuzzleHttp\\Psr7\\Uri",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/html/3rdparty/guzzlehttp/guzzle/src/Client.php",
        "line": 161,
        "function": "uriFor",
        "class": "GuzzleHttp\\Psr7\\Utils",
        "type": "::",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/html/3rdparty/guzzlehttp/guzzle/src/Client.php",
        "line": 189,
        "function": "requestAsync",
        "class": "GuzzleHttp\\Client",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/html/lib/private/Http/Client/Client.php",
        "line": 205,
        "function": "request",
        "class": "GuzzleHttp\\Client",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***",
          "*** sensitive parameters replaced ***",
          {
            "verify": "/var/www/html/resources/config/ca-bundle.crt",
            "timeout": 30,
            "nextcloud": {
              "allow_local_address": true
            },
            "headers": {
              "User-Agent": "Nextcloud Server Crawler",
              "Accept-Encoding": "gzip"
            },
            "synchronous": true
          }
        ]
      },
      {
        "file": "/var/www/html/custom_apps/mail/lib/Controller/ProxyController.php",
        "line": 106,
        "function": "get",
        "class": "OC\\Http\\Client\\Client",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 208,
        "function": "proxy",
        "class": "OCA\\Mail\\Controller\\ProxyController",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php",
        "line": 114,
        "function": "executeController",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          {
            "__class__": "OCA\\Mail\\Controller\\ProxyController"
          },
          "proxy"
        ]
      },
      {
        "file": "/var/www/html/lib/private/AppFramework/App.php",
        "line": 161,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->",
        "args": [
          {
            "__class__": "OCA\\Mail\\Controller\\ProxyController"
          },
          "proxy"
        ]
      },
      {
        "file": "/var/www/html/lib/private/Route/Router.php",
        "line": 302,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::",
        "args": [
          "OCA\\Mail\\Controller\\ProxyController",
          "proxy",
          {
            "__class__": "OC\\AppFramework\\DependencyInjection\\DIContainer"
          },
          {
            "_route": "mail.proxy.proxy"
          }
        ]
      },
      {
        "file": "/var/www/html/lib/base.php",
        "line": 1003,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->",
        "args": [
          "/apps/mail/proxy"
        ]
      },
      {
        "file": "/var/www/html/index.php",
        "line": 24,
        "function": "handleRequest",
        "class": "OC",
        "type": "::",
        "args": []
      }
    ],
    "File": "/var/www/html/3rdparty/guzzlehttp/psr7/src/Uri.php",
    "Line": 85,
    "message": "Unable to parse URI: https:///custom_apps/mail/img/blocked-image.png",
    "exception": [],
    "CustomMessage": "Unable to parse URI: https:///custom_apps/mail/img/blocked-image.png"
  },
  "id": "________"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant