Skip to content

Conversation

@Sitlos
Copy link
Contributor

@Sitlos Sitlos commented Jul 1, 2022

Can't parse db name in .env file when trying to bypass the password. Below is the detailed issue link.
#3081

Can't parse db name in .env file when trying to bypass the password. Below is the detailed issue link.
sqlitebrowser#3081
@chrisjlocke
Copy link
Member

So if my poor regular expression knowledge is good, it was only accepting a-z (both lower and uppercase), 0-9, period, dash and underscrore, and now you've added @.
Isn't this a bit strict? What about £ in filenames? Or +? Brackets?
I see the value part is simply .* (everything) - can't the filename part be the same? Maybe it's not 'best practice', so just throwing it out there...

@scottfurry
Copy link
Contributor

So if my poor regular expression knowledge is good, it was only accepting a-z (both lower and uppercase), 0-9, period, dash and underscrore, and now you've added @. Isn't this a bit strict? What about £ in filenames? Or +? Brackets?

...and we haven't even broached unicode characters in filenames...

@chrisjlocke
Copy link
Member

can-of-worms.gif 😂

@Sitlos
Copy link
Contributor Author

Sitlos commented Jul 2, 2022

Yes, this Pull Request can't solve other special symbols. I think maybe something like below may solve all the special symbols (except '=')
Normal format: ^\s*([^=]+)\s*=\s*(.)\s$
QRegularExpression format: In pull request

@mgrojo mgrojo merged commit 6f9e6ba into sqlitebrowser:master Oct 15, 2022
@mgrojo
Copy link
Member

mgrojo commented Oct 15, 2022

Merged. Thanks, @Sitlos.

mgrojo added a commit that referenced this pull request Mar 25, 2024
Custom format is not loading the fields and implementation is not justified
as the .env format is basically a simplification of the IniFormat.

Tested with:

- Built for x86_64-little_endian-lp64, running on x86_64
- Qt Version 5.15.3
- SQLCipher Version 3.4.1 (based on SQLite 3.15.2).

Tested no regression for #3083.
justinclift pushed a commit that referenced this pull request Mar 26, 2024
Custom format is not loading the fields and implementation is not justified
as the .env format is basically a simplification of the IniFormat.

Tested with:

- Built for x86_64-little_endian-lp64, running on x86_64
- Qt Version 5.15.3
- SQLCipher Version 3.4.1 (based on SQLite 3.15.2).

Tested no regression for #3083.
lucydodo pushed a commit that referenced this pull request May 25, 2024
Custom format is not loading the fields and implementation is not justified
as the .env format is basically a simplification of the IniFormat.

Tested with:

- Built for x86_64-little_endian-lp64, running on x86_64
- Qt Version 5.15.3
- SQLCipher Version 3.4.1 (based on SQLite 3.15.2).

Tested no regression for #3083.
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

Successfully merging this pull request may close these issues.

4 participants