Skip to content

Conversation

dependabot[bot]
Copy link

@dependabot dependabot bot commented on behalf of github Apr 20, 2020

Bumps tortoise-orm from 0.16.5 to 0.16.6.

Release notes

Sourced from tortoise-orm's releases.

v0.16.6

This is a security fix release. We strongly recommend people upgrade.

Security fixes:

  • Fixed SQL injection issue in MySQL
  • Fixed SQL injection issues in MySQL when using contains, starts_with or ends_with filters (and their case-insensitive counterparts)
  • Fixed malformed SQL for PostgreSQL and SQLite when using contains, starts_with or ends_with filters (and their case-insensitive counterparts)

Other changes:

  • Added support for partial models:

    To create a partial model, one can do a .only(<fieldnames-as-strings>) as part of the QuerySet. This will create model instances that only have those values fetched.

    Persisting changes on the model is allowed only when:

    • All the fields you want to update is specified in <model>.save(update_fields=[...])
    • You included the Model primary key in the `.only(...)``

    To protect against common mistakes we ensure that errors get raised:

    • If you access a field that is not specified, you will get an AttributeError.
    • If you do a <model>.save() a IncompleteInstanceError will be raised as the model is, as requested, incomplete.
    • If you do a <model>.save(update_fields=[...]) and you didn't include the primary key in the .only(...), then IncompleteInstanceError will be raised indicating that updates can't be done without the primary key being known.
    • If you do a <model>.save(update_fields=[...]) and one of the fields in update_fields was not in the .only(...), then IncompleteInstanceError as that field is not available to be updated.
  • Fixed bad SQL generation when doing a .values() query over a Foreign Key
  • Added <model>.update_from_dict({...}) that will mass update values safely from a dictionary
  • Fixed processing URL encoded password in connection string
Changelog

Sourced from tortoise-orm's changelog.

0.16.6

.. warning::

This is a security fix release. We recommend everyone update.

Security fixes ^^^^^^^^^^^^^^

  • Fixed SQL injection issue in MySQL
  • Fixed SQL injection issues in MySQL when using contains, starts_with or ends_with filters (and their case-insensitive counterparts)
  • Fixed malformed SQL for PostgreSQL and SQLite when using contains, starts_with or ends_with filters (and their case-insensitive counterparts)

Other changes ^^^^^^^^^^^^^

  • Added support for partial models:

    To create a partial model, one can do a .only(<fieldnames-as-strings>) as part of the QuerySet. This will create model instances that only have those values fetched.

    Persisting changes on the model is allowed only when:

    • All the fields you want to update is specified in <model>.save(update_fields=[...])
    • You included the Model primary key in the `.only(...)``

    To protect against common mistakes we ensure that errors get raised:

    • If you access a field that is not specified, you will get an AttributeError.
    • If you do a <model>.save() a IncompleteInstanceError will be raised as the model is, as requested, incomplete.
    • If you do a <model>.save(update_fields=[...]) and you didn't include the primary key in the .only(...), then IncompleteInstanceError will be raised indicating that updates can't be done without the primary key being known.
    • If you do a <model>.save(update_fields=[...]) and one of the fields in update_fields was not in the .only(...), then IncompleteInstanceError as that field is not available to be updated.
  • Fixed bad SQL generation when doing a .values() query over a Foreign Key
  • Added <model>.update_from_dict({...}) that will mass update values safely from a dictionary
  • Fixed processing URL encoded password in connection string
Commits
  • 50bf708 v0.16.6
  • e45d414 Process URL encoded password in connection string (#356)
  • 91c3640 Fixed various SQL generation issues
  • 816ff00 Added <model>.update_from_dict({...}) that will mass update values safely fro...
  • 8866768 Fixed bad SQL generation when doing a .values() query over a Foreign Key(#351)
  • 42adca3 Remove unnesecary SQL casts for string comparisons
  • 733eaf3 Updated deps & fixed new darglint messages
  • 945e24a Partial model .only(...) support (#350)
  • See full diff in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

@dependabot dependabot bot added the dependencies Pull requests that update a dependency file label Apr 20, 2020
@dependabot @github
Copy link
Author

dependabot bot commented on behalf of github Mar 15, 2021

Dependabot tried to update this pull request, but something went wrong. We're looking into it, but in the meantime you can retry the update by commenting @dependabot rebase.

1 similar comment
@dependabot @github
Copy link
Author

dependabot bot commented on behalf of github Mar 21, 2022

Dependabot tried to update this pull request, but something went wrong. We're looking into it, but in the meantime you can retry the update by commenting @dependabot rebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants