Skip to content

Py3 and transaction support - #71

Open
dieselmachine wants to merge 8 commits into
devhub:developfrom
dieselmachine:py3-and-transaction-support
Open

dieselmachine wants to merge 8 commits into
devhub:developfrom
dieselmachine:py3-and-transaction-support

Conversation

@dieselmachine

Copy link
Copy Markdown
Member

No description provided.

@devhub-code-reviewer devhub-code-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review (devhub-code-reviewer). Comment only: this does not approve or block the pull request.

Shrinks the OAuth consumer key column from 255 to 32 characters, adds a 33-character nonce length, and removes the KEY_LEN and SECRET_LEN constants. The types.py and forms.py additions (ListVarchar, DictVarchar) already exist on the base branch at the merge context, so those parts are effectively whitespace-only after merge. The title mentions Py3 and transaction support and the description is empty, but the diff contains neither. The column narrowing is the part that needs attention: it is a schema change with no migration and no stated check of existing data.

Findings: 2 (1 major, 1 minor), 1 filed as issues

  • major: OAuth key column shrunk to 32 chars with no migration → #80

Base = orm.Base

MAX_KEY_LEN = 255
MAX_KEY_LEN = 32

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

major: OAuth key column shrunk to 32 chars with no migration → #80

token_key = Column(String(32))
consumer_key = Column(String(MAX_KEY_LEN), nullable=False)
key = Column(String(255), nullable=False)
key = Column(String(MAX_NONCE_LEN), nullable=False)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor: The nonce key column goes from 255 to 33 characters. Clients choose OAuth nonces, and some send longer values, so inserts can fail or be truncated, which weakens replay protection if truncation causes collisions. Existing tables are not altered by this change. Add a migration and confirm the supported nonce length, or keep a larger width.

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.

1 participant