question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

accommodate for @ in database portion even if user:pass is present

See original GitHub issue

Versions

  • OS: CentOS 7
  • Python: 3.6.8
  • SQLAlchemy: 1.4.15
  • Database: Mysql
  • DBAPI: pymysql

When creating_engine, if the password contains special characters, I understand that it is URL Encoding

DB Test IP : 1.1.1.1 PORT: 3306 ID: test PW: test DB Name: test@test

question

  1. What should I do if there are special characters in DB Name? DB Name does not appear to be doing separate decoding
742 tokens = components["database"].split("?", 2)
743 components["database"] = tokens[0]

Parsing error on regular expression below when @ is entered in DB Name

re.compile('\n (?P<name>[\w\+]+)😕/\n (?:\n (?P<username>[^:/])\n (?:😦?P<password>.))?\n @)?\n (?:\n (?:\n , re.VERBOSE) {‘name’: ‘mysql+pymysql’, ‘username’: ‘test’, ‘password’: ‘test@1.1.1.1:3306/test’, ‘ipv6host’: None, ‘ipv4host’: ‘test’, ‘port’: None, ‘database’: None}

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:19 (11 by maintainers)

github_iconTop GitHub Comments

12reactions
BuSHaricommented, May 31, 2021

Mike Bayer has proposed a fix for this issue in the master branch:

URL parsing fixes https://gerrit.sqlalchemy.org/c/sqlalchemy/sqlalchemy/+/2838

That fix broke our engine connection when we use ‘@’ in our password string, we wanted to avoid using urlib parse quote. Anyway to revert that fix?

5reactions
CaselITcommented, May 31, 2021

The classic Percent-encoding should work

Read more comments on GitHub >

github_iconTop Results From Across the Web

Chapter 8-Protecting Your System: User Access Security, from ...
Use software that requires "message authentication" in addition to "user authentication": Even if a user can provide the right password, each message sent...
Read more >
AP CSP Semester 1 Exam Flashcards
The code segment compares pairs of list elements, setting containsDuplicates to true if any two elements are found to be equal in value....
Read more >
Working with a DB instance in a VPC - AWS Documentation
Each DB subnet group should have subnets in at least two Availability Zones in a given AWS Region. When creating a DB instance...
Read more >
4768(S, F) A Kerberos authentication ticket (TGT) was ...
If TGT issue fails then you will see Failure event with Result Code ... Client not found in Kerberos database, The username doesn't...
Read more >
4.5.4 mysqldump — A Database Backup Program
With large data sizes, even if the backup step takes a reasonable time, restoring the ... using mysqlbackup, which is available as part...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found