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

double sub-path when using iframe API #22737

Closed
ralfbecker opened this issue Jul 22, 2021 · 2 comments · Fixed by #22796
Closed

double sub-path when using iframe API #22737

ralfbecker opened this issue Jul 22, 2021 · 2 comments · Fixed by #22796

Comments

@ralfbecker
Copy link
Contributor

Description:

Running RC 3.15.4 or 3.16.3 on a subpath like https://example.org/rocketchat iframe API "go" commands via postMessage fail:

frame.contentWindow.postMessage({externalCommand: "go", path: "/admin"}, "*")

adds sub-path twice, same for path "/account"

Browser shows the RC 404 page and using the JS console you get the iframe url with the doubled sub-path

document.location.href
"https://pole.egroupware.org/rocketchat/rocketchat/admin"

Steps to reproduce:

Expected behavior:

Admin page will be opened for an admin.

Actual behavior:

RC 404 page is displayed.

Server Setup Information:

  • Version of Rocket.Chat Server: 3.15.4 and 3.16.3 tested
  • Operating System: Linux
  • Deployment Method: official docker container
  • Number of Running Instances: 1
  • DB Replicaset Oplog: yes
  • NodeJS Version: v12.22.1
  • MongoDB Version: 4.2.13 / wiredTiger (oplog Enabled)

Client Setup Information

  • Desktop App or Browser Version: recent Chrome Browser, probably with every browser
  • Operating System: Windows, Mac or Linux

Additional context

Relevant logs:

via browser JS console you get for the RC iframe:

document.location.href
"https://pole.egroupware.org/rocketchat/rocketchat/admin"

Nothing in the Docker logs.

@johncrisp
Copy link

Hi Ralf and thanks for reporting this.

I'll get this to the Product Team.

@ralfbecker
Copy link
Contributor Author

Pull-request: #22796

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

Successfully merging a pull request may close this issue.

2 participants