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

sys.getUser('https://me:pw@www.monetdb.org/Doc') does not return the user: me #6844

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments
Labels
bug Something isn't working normal SQL

Comments

@monetdb-team
Copy link

Date: 2020-03-27 00:13:31 +0100
From: Martin van Dinther <<martin.van.dinther>>
To: SQL devs <>
Version: 11.35.19 (Nov2019-SP3)
CC: @PedroTadim

Last updated: 2020-07-27 09:30:15 +0200

Comment 27629

Date: 2020-03-27 00:13:31 +0100
From: Martin van Dinther <<martin.van.dinther>>

User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:74.0) Gecko/20100101 Firefox/74.0
Build Identifier:

According to https://en.wikipedia.org/wiki/URLSyntax it should be possible to specify a user in a URL as part of the authority component.
When used I expected the sys.getUser(url) function to extract and return the user part. However it returns null.
It appears the implementation of URLgetUser() in monetdb5/modules/atoms/url.c is incorrect.

Reproducible: Always

Steps to Reproduce:

select sys.getUser('https://me:pw@www.monetdb.org/Doc');

Actual Results:

sql>select sys.getUser('https://me:pw@www.monetdb.org/Doc');
+------+
| L2 |
+======+
| null |
+------+
1 tuple
sql>

Expected Results:

sql>select sys.getUser('https://me:pw@www.monetdb.org/Doc');
+----+
| L2 |
+====+
| me |
+----+
1 tuple
sql>

monetdb5/modules/atoms/url.c line 655
URLgetUser() should be implemented similar to URLgetHost() or URLgetPort(), so without (s = skip_path(p, NULL, NULL)) == NULL).

Comment 27854

Date: 2020-06-15 18:59:01 +0200
From: MonetDB Mercurial Repository <>

Changeset 7a65c6210abc made by Pedro Ferreira pedro.ferreira@monetdbsolutions.com in the MonetDB repo, refers to this bug.

For complete details, see https//devmonetdborg/hg/MonetDB?cmd=changeset;node=7a65c6210abc

Changeset description:

Fix for bug #6844, ie parse correctly the user field from URLs
@monetdb-team monetdb-team added bug Something isn't working normal SQL labels Nov 30, 2020
@sjoerdmullender sjoerdmullender added this to the Ancient Release milestone Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working normal SQL
Projects
None yet
Development

No branches or pull requests

2 participants