-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
sqlx uses time instead of chrono #3412
Comments
Hi. Could you try producing a minimal reproducible example? Here is my MRE, assuming that the typo in the sqlx veryion above is a typo (otherwise upgrate do 0.8 and be happy that your issue is fixed ^^) |
Note that I also cannot reproduce this in |
I guess something else activating |
Here's my |
Yup, can confirm something is activating |
This was a breaking change in 0.8.0. It's the first entry in the CHANGELOG: https://github.com/launchbadge/sqlx/blob/main/CHANGELOG.md#breaking The plan is to make it possible to specify an override in sqlx/sqlx-core/src/config/reference.toml Line 21 in e14c737
|
@abonander I thought explicitly disabling |
It's not just another crate depending on In your case, that appears to be
We can confirm this by looking at their I would consider this their bug due to them hardcoding the |
In the meantime, you can use type overrides to work around this: https://docs.rs/sqlx/latest/sqlx/macro.query.html#force-a-differentcustom-type |
This is pretty annoying. We need to update to 0.8.x due to the advisory in 0.7.x but we have to change hundreds of queries due to that change. I sthere any easier approach? Or can the advisory be fixed in a 0.7.5? |
I included mitigation advice in the advisory for a reason. If you take reasonable precautions it's unlikely to be exploitable. For that same reason, I'm not inclined to spend my limited bandwidth backporting the fix. We have no LTS policy for releases and I don't want people to get the impression that we do. If the danger was more immediate, it'd be a different story, but no other database lib has even bothered to publish an advisory yet, and I know at least Diesel is likely affected as well because they've done their own extensive audit and they're considering backporting the changes. Otherwise, you could instead find and deal with the dependency that's enabling the |
Is there a way to do this on an INSERT/UPDATE, I can't seem to see what the syntax would look like in that case. |
Usually you just bind your value: |
let's wait for this maxcountryman/tower-sessions-stores#46 to be released |
Maybe use my fork for temporary solution: https://crates.io/crates/tower-sessions-sqlx-store-chrono |
Bug Description
sqlx 0.8.0
After using 0.8.0, there's an opposite of this problem: #2689
Minimal Reproduction
Info
rustc --version
: 1.80.0The text was updated successfully, but these errors were encountered: