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

[Bug]: Remove the use of periods in environment variables #3

Open
1 task done
jonbarrow opened this issue Jun 5, 2024 · 4 comments
Open
1 task done

[Bug]: Remove the use of periods in environment variables #3

jonbarrow opened this issue Jun 5, 2024 · 4 comments
Labels
approved The topic is approved by a developer bug Something isn't working

Comments

@jonbarrow
Copy link
Member

Checked Existing

  • I have checked the repository for duplicate issues.

What happened?

Currently the DNS server expects custom mapped domains in environment variables to be fully qualified domains, including using periods. However as pointed out by @mrjvs this is not safe. Environment variables [A-Za-z0-9_]+ can only be, and some systems may filter out keys which have invalid characters.

What did you expect to happen?

Use a different structure for SSSL_DNS_MAP environment variables. The way jvs solved this was just by removing periods (examplecom rather than example.com). But this is, honestly, ugly. I suggest either

  • SSSL_DNS_MAP_example_com
  • SSSL_DNS_MAP_EXAMPLE_COM

We would then need to modify the incoming domain during lookup

Steps to reproduce?

No response

Other relevant information. (OPTIONAL)

No response

@jonbarrow jonbarrow added bug Something isn't working awaiting-approval Topic has not been approved or denied approved The topic is approved by a developer and removed awaiting-approval Topic has not been approved or denied labels Jun 5, 2024
@DaniElectra
Copy link
Member

DaniElectra commented Jun 5, 2024

Removing periods also wouldn't work since we then don't know how the hostname is formatted. I think we can use snake_case and replace the underscores with dots? example_com => example.com

@jonbarrow
Copy link
Member Author

Removing periods also wouldn't work since we then don't know how the hostname is formatted

I'm not sure what you mean? The hostname in the DNS request would look like account.nintendo.net. All we'd have to do is remove the periods and that becomes accountnintendonet, which would lineup with the environment variable

@DaniElectra
Copy link
Member

I didn't consider that, disregard then

@christophe-asselin
Copy link

I'd be open to pick this up. Only problem is that I do not own a Wii U, so I would be unable to test this with a physical set up. I can test by making a couple of manual requests, but I don't know if that is good enough.

My only question is: do we want the server to stay backwards compatible with the old environment variable format or make the new format mandatory?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved The topic is approved by a developer bug Something isn't working
Projects
Status: Todo
Development

No branches or pull requests

3 participants