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

username is not supported in links #76

Open
Simon-Laux opened this issue Jun 4, 2024 · 3 comments
Open

username is not supported in links #76

Simon-Laux opened this issue Jun 4, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@Simon-Laux
Copy link
Member

Simon-Laux commented Jun 4, 2024

username + password are not supported. note that there are only limited characters supported, the rest needs to be uri encoded. Also note there ca only be a username with no password.

Examples

Just username

Input:

http://username@www.example.com

Actual Output:

[
    {
        "t": "Link",
        "c": {
            "destination": {
                "target": "http://username",
                "hostname": "username",
                "scheme": "http"
            }
        }
    },
    {
        "t": "Text",
        "c": "@www.example.com"
    }
]

Expected Output:

[
    {
        "t": "Link",
        "c": {
            "destination": {
                "target": "http://username@www.example.com",
                "hostname": "username",
                "scheme": "http"
            }
        }
    }
]

Username + Password

Input:

http://username:password@www.example.com

Actual Output:

[
    {
        "t": "Link",
        "c": {
            "destination": {
                "target": "http://username",
                "hostname": "username:password@www.example.co",
                "punycode": {
                    "original_hostname": "username:password@www.example.co",
                    "ascii_hostname": "xn--username:password@www-.example.co",
                    "punycode_encoded_url": "http://username"
                },
                "scheme": "http"
            }
        }
    },
    {
        "t": "Text",
        "c": ":"
    },
    {
        "t": "EmailAddress",
        "c": "password@www.example.com"
    }
]

Expected Output:

[
    {
        "t": "Link",
        "c": {
            "destination": {
                "target": "http://username:password@www.example.com",
                "hostname": "www.example.com",
                "scheme": "http"
            }
        }
    }
]

dclogin scheme

Input:

dclogin://example@nine.testrun.org?p=L%265j%3A%40g%3C3%5C%5Crr&v=1

Actual Output:

[
    {
        "t": "Link",
        "c": {
            "destination": {
                "target": "dclogin://example",
                "hostname": "example",
                "scheme": "dclogin"
            }
        }
    },
    {
        "t": "Text",
        "c": "@nine.testrun.org?p=L%265j%3A%40g%3C3%5C%5Crr&v=1"
    }
]

Expected Output:

[
    {
        "t": "Link",
        "c": {
            "destination": {
                "target": "dclogin://example@nine.testrun.org?p=L%265j%3A%40g%3C3%5C%5Crr&v=1",
                "hostname": "nine.testrun.org",
                "scheme": "dclogin"
            }
        }
    }
]
@Simon-Laux Simon-Laux added the bug Something isn't working label Jun 4, 2024
@farooqkz farooqkz self-assigned this Jun 4, 2024
@farooqkz
Copy link
Collaborator

farooqkz commented Jun 8, 2024

Regarding the DCLOGIN example, shouldn't the hostname be None or null or perhaps nine.testrun.org?

@Simon-Laux
Copy link
Member Author

Regarding the DCLOGIN example, shouldn't the hostname be None or null or perhaps nine.testrun.org?

yes, thanks for noticing

@farooqkz
Copy link
Collaborator

farooqkz commented Jun 8, 2024

Regarding the DCLOGIN example, shouldn't the hostname be None or null or perhaps nine.testrun.org?

yes, thanks for noticing

So which one? Should it be nine.testrun.org

@Simon-Laux Simon-Laux reopened this Jun 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants