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

Deleting Password Leaves Colon Behind #13

Closed
theory opened this issue Dec 6, 2013 · 1 comment
Closed

Deleting Password Leaves Colon Behind #13

theory opened this issue Dec 6, 2013 · 1 comment

Comments

@theory
Copy link

theory commented Dec 6, 2013

 % perl -MURI -E 'my $u = URI->new("rsync://foo:bar\@example.com"); $u->password(undef); say $u'
rsync://foo:@example.com

I think the output should actually be:

rsync://foo@example.com

I think this patch would fix it:

--- a/URI/_userpass.pm
+++ b/URI/_userpass.pm
@@ -35,8 +35,8 @@ sub password
    my $user = defined($info) ? $info : "";
    $user =~ s/:.*//;

-   if (!defined($new) && !length($user)) {
-       $self->userinfo(undef);
+   if (!defined($new)) {
+       $self->userinfo(length $user ? $user : undef);
    } else {
        $new = "" unless defined($new);
        $new =~ s/%/%25/g;
joenio added a commit to joenio/uri that referenced this issue Jan 24, 2016
simbabque pushed a commit that referenced this issue Apr 29, 2023
oalders pushed a commit that referenced this issue Apr 29, 2023
oalders pushed a commit that referenced this issue Apr 29, 2023
@simbabque
Copy link
Contributor

Fixed in #31

theory added a commit to sqitchers/sqitch that referenced this issue May 10, 2023
When there is a username but no password, URI used to leave an orphan
colon in the URI (reported in libwww-perl/URI#13). That bug was fixed in
libwww-perl/URI#31, leading to failures in Sqitch tests expecting the
colon to be present.

So change the tests to use a regular expression to match such URIs, so
that the presence of the colon is optional. Resolves #744.
theory added a commit to sqitchers/sqitch that referenced this issue May 10, 2023
When there is a username but no password, URI used to leave an orphan
colon in the URI (reported in libwww-perl/URI#13). That bug was fixed in
libwww-perl/URI#31, leading to failures in Sqitch tests expecting the
colon to be present.

libwww-perl/URI-db#23 also changed the DSN of URI::Oracle to specify the
database name with `service_name=`.

So change the tests to use regular expressions to match such URIs and
DSNs, so that the presence of the colon or service name is optional.
Resolves #744.
theory added a commit to sqitchers/sqitch that referenced this issue May 10, 2023
When there is a username but no password, URI used to leave an orphan
colon in the URI (reported in libwww-perl/URI#13). That bug was fixed in
libwww-perl/URI#31, leading to failures in Sqitch tests expecting the
colon to be present.

libwww-perl/URI-db#23 also changed the DSN of URI::Oracle to specify the
database name with `service_name=`.

So change the tests to use regular expressions to match such URIs and
DSNs, so that the presence of the colon or service name is optional.
Resolves #744.
theory added a commit to sqitchers/sqitch that referenced this issue May 10, 2023
When there is a username but no password, URI used to leave an orphan
colon in the URI (reported in libwww-perl/URI#13). That bug was fixed in
libwww-perl/URI#31, leading to failures in Sqitch tests expecting the
colon to be present.

libwww-perl/URI-db#23 also changed the DSN of URI::Oracle to specify the
database name with `service_name=`.

So change the tests to use regular expressions to match such URIs and
DSNs, so that the presence of the colon or service name is optional.
Resolves #744.
theory added a commit to sqitchers/sqitch that referenced this issue May 17, 2023
When there is a username but no password, URI used to leave an orphan
colon in the URI (reported in libwww-perl/URI#13). That bug was fixed in
libwww-perl/URI#31, leading to failures in Sqitch tests expecting the
colon to be present.

libwww-perl/URI-db#23 also changed the DSN of URI::Oracle to specify the
database name with `service_name=`.

So change the tests to use regular expressions to match such URIs and
DSNs, so that the presence of the colon or service name is optional.
Resolves #744.
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this issue Aug 2, 2023
- Fixed Snowflake warehouse and role setup to properly quote identifiers
  unless they're valid unquoted identifiers or already quoted. Thanks to
  @marc-marketparts for the report (#685).
- Fixed a bug reworking a change when a rework directory is configured
  but not created. Thanks to @jfeaver for the report (#686).
- Output the list of changes to be deployed or reverted when `--verbose`
  is specified at least twice. Thanks to @vectro for the PR (#702).
- Fixed the formatting of the log and plan commands to allow empty or `0`
  separators in lists of things (such as `%{0}t` for a list of tags).
  Thanks to @web-vertalo for the pull request (#703).
- Updated the MySQL Tutorial to use 5.7 features. Thanks to Vlad
  Safronov for the PR (#705).
- Deprecated the `no_prompt` and `no_prompt` attributes of
  App::Sqitch::Engine in favor of passing booleans to the `revert` and
  `verify` methods. The attributes still exist for reverse compatibility,
  but now emit warnings and will be removed in the future. Thanks to
  Thanks to @vectro for the PR (#704).
- Added a warning for a double extension on the file names created
  by the `add` command. Thanks to @blairjordan for the PR (#724)!
- Added the `revert.strict` boolean configuration variable which, when
  set to true, requires the specification of a change to revert to. It
  also disables the `rebase` and `checkout` commands, though the
  `rebase.strict` and `checkout.strict` variables, respectively, may
  override it. Use `revert.strict` to prevent accidental reverts in
  sensitive environments. Thanks to @vectro for the PR (#719; revised in
  #735)!
- Fixed test failures due to a bug fix in the Perl URI module
  (libwww-perl/URI#13). Thanks to @bobfang for the report (#744)!
- Fixed test failures due to a change in the generation of DBI DSN by
  URI::Oracle introduced by libwww-perl/URI-db#23.
- Added a format option `%F` to `sqitch plan` that prints the path for
  the deploy file for each migration in the plan.
- Changed the default location for the Oracle `sqlplus` client when the
  `ORACLE_HOME` environment variable is set. It now returns either
  `$ORACLE_HOME/bin/sqlplus` or `$ORACLE_HOME/sqlplus` if it exists
  and is executable (and ends in `.exe` on Windows). Otherwise it simply
  returns `sqlplus` as before, assuming it will be found in the path.
  Thanks to @vectro for the suggestion (#747).
- Increased the required version of DBI to 1.631 or higher and removed
  a MySQL engine workaround for older versions.
- Added detection of a missing registry schema on connect and conditions
  to avoid querying it when it does not exist. Fixes an issue where
  Sqitch might find a project record in the current schema instead of the
  expected registry schema. Thanks to @vectro for the report and
  investigation (#668)!
- Fixed Snowflake and MySQL to properly raise errors on session query
  failures immediately after connection.
- Fixed the handling of unique violations for deploy script hash
  uniqueness so that it no longer returns a database error but properly
  reports the issue in a more human-friendly error message. Thanks to
  Stefan Badenhorst for the reminder (#630).
- Updated the registry SQL scripts for Vertica to always enable primary
  key and unique constraints. Unique constraints are now enabled for
  all database engines except Exasol and Snowflake.
- Dropped support for Vertica 7.1, as unique constraint enforcement was
  not added until Vertica 7.2.
- Increased minimum SQLite versions to 3.8.6, when unique constraint
  enforcement was added.
- Removed remaining uses of the smartmatch operator, thus eliminating
  the Perl 5.38 warnings about its deprecation. (#769)
- Added Cockroach to the list of valid engines recognized in command-line
  arguments (and a test to ensure new engines won't be omitted in the
  future). Thanks to @NOBLES5E for the spot (#772)!
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

No branches or pull requests

2 participants