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

Support explicitly specifying http or https protocol in plugin #642

Merged
merged 2 commits into from
Sep 30, 2022
Merged

Support explicitly specifying http or https protocol in plugin #642

merged 2 commits into from
Sep 30, 2022

Conversation

fewkz
Copy link
Contributor

@fewkz fewkz commented Sep 29, 2022

When you put in the URL https://example.com, it would try to send a request to http://https://example.com instead, which would cause an "InvalidUrl" error. This fixes the error by only implicitly adding http:// if a protocol is not otherwise specified.
This change is necessary for a project I'm working on that serves a Rojo project over https (via an SSL termination proxy) in order to prevent man in the middle attacks.

Copy link
Member

@boatbomber boatbomber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@LPGhatguy LPGhatguy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for filing this PR!

It's important to note that because Rojo has no authentication support in the protocol, running it over the internet is discouraged. Having no authentication also means that TLS doesn't help all that much — you don't need to have a Man in the Middle, an attacker can just send their own requests to the same place!

That said, I'm approving this PR because it's small, tidy, and readable. If we want to support more interesting input, like paths in the URL, we should invest in making a URL parsing package at some point.

@LPGhatguy LPGhatguy merged commit 96cb1ee into rojo-rbx:master Sep 30, 2022
@fewkz fewkz deleted the patch-1 branch October 1, 2022 02:17
Dekkonot pushed a commit to UpliftGames/rojo that referenced this pull request Jan 11, 2024
…rbx#642)

* Support explicitly specifying http or https protocol in plugin

* Fix incorrect format string

Port is not a number
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 this pull request may close these issues.

3 participants