Skip to content

Fixed bug when deleting hashlist - #2460

Open
jessevz wants to merge 1 commit into
masterfrom
2458-bug-not-possible-to-delete-hashlist-when-part-of-superhashlist
Open

Fixed bug when deleting hashlist#2460
jessevz wants to merge 1 commit into
masterfrom
2458-bug-not-possible-to-delete-hashlist-when-part-of-superhashlist

Conversation

@jessevz

@jessevz jessevz commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

closes #2458

@jessevz
jessevz requested review from s3inlc and a lite review from Copilot August 24, 2026 12:01
@jessevz jessevz linked an issue Aug 24, 2026 that may be closed by this pull request

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Fixes deletion of a hashlist that belongs to one or more superhashlists when the member hashlist has 0 hashes and/or 0 cracked entries, by avoiding invalid decrement operations that previously threw.

Changes:

  • Guard superhashlist counter decrements during member-hashlist deletion to avoid dec(..., 0) exceptions.
  • Add an API v2 regression test covering deletion of a superhashlist member with zero cracked entries.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/inc/utils/HashlistUtils.php Adds conditional guards around superhashlist dec() calls to prevent errors when decrement amounts are zero.
ci/apiv2/test_hashlist.py Adds a regression test to ensure deleting a superhashlist member with zero cracked entries succeeds.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/inc/utils/HashlistUtils.php
Comment thread ci/apiv2/test_hashlist.py
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.

[BUG]: not possible to delete hashlist when part of superhashlist

2 participants