google / google/fuzzbench

Cloud Config: Passwords with non-alphanumeric characters might not work.

Open
#1,801 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.2k
Forks
302
PR merge metrics
No merged PRs in 30d

Description

I am following the documentation for [setting up a cloud project](https://google.github.io/fuzzbench/running-a-cloud-experiment/setting-up-a-google-cloud-project/) and they mention to set up a password for the sql database.
I used a chrome auto-suggested password that contained non-alphabetic characters ('@', '.', and ':'), and that caused the `alembic upgrade` command to fail:

```shell
PYTHONPATH=. alembic upgrade head
```

```
File "/data/fuzzbench/database/alembic/env.py", line 90, in
run_migrations_online()
File "/data/fuzzbench/database/alembic/env.py", line 73, in run_migrations_online
connectable = engine_from_config(
File "/data/fuzzbench/.venv/lib/python3.10/site-packages/sqlalchemy/engine/create.py", line 743, in engine_from_config
return create_engine(url, **options)
File "", line 2, in create_engine
File "/data/fuzzbench/.venv/lib/python3.10/site-packages/sqlalchemy/util/deprecations.py", line 309, in warned
return fn(*args, **kwargs)
File "/data/fuzzbench/.venv/lib/python3.10/site-packages/sqlalchemy/engine/create.py", line 518, in create_engine
u = _url.make_url(url)
File "/data/fuzzbench/.venv/lib/python3.10/site-packages/sqlalchemy/engine/url.py", line 725, in make_url
return _parse_rfc1738_args(name_or_url)
File "/data/fuzzbench/.venv/lib/python3.10/site-packages/sqlalchemy/engine/url.py", line 781, in _parse_rfc1738_args
components["port"] = int(components["port"])
ValueError: invalid literal for int() with base 10: '@127.0.0.1:5432'
```

It seems like the regexp used to parse the database url does not support a password with strange characters.
A workaround is to remove the offending characters from the password.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.