Test that a string before the nesting does not hide it from the token's depth scan
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 84/100
Research direction
Start with the _shallow tests in tests/test_caller_backends.py and read the existing test_many_sibling_arrays_are_not_nesting test. Add the provided string-before-nesting cases and parametrize the sibling-array test over "[]" and "{}". Run the focused tests and confirm the new cases pass and catch both escaped-state mutants.
Written by the indexing model from the issue text.
Description
Non-blocking item from the approving review of #123. _shallow's tests (tests/test_caller_backends.py) put every string inside the deepest bracket, so they only check one direction: a string's brackets are not taken as nesting. Nothing checks that a string before the nesting does not hide it from the scan. Two mutants survive (dropping escaped = True on a backslash, and never resetting escaped), and either one brings back the SIGSEGV on a 1 MB thread.
Add (checked by the reviewer to pass at 3c39337 and to kill both mutants):
@pytest.mark.spec("HTTP-7")
@pytest.mark.parametrize("before", ['"\\""', '"\\\\"', '"\\\\\\""'])
def test_a_string_before_the_nesting_does_not_hide_it(before: str) -> None:
head = text(header())[:-1] + ',"y":' + before + ',"x":' + "[" * 64 + "]" * 64 + "}"
assert check(bearer(signed(raw_head=head)), IDENTITY, KEYS, NOW) == (None, None)
and parametrize test_many_sibling_arrays_are_not_nesting over "[]" and "{}".
- Dominant language
- Python
- Stars
- 1
- Forks
- 0
- Avg merge
- 5h 30m
- Merged PRs (30d)
- 85
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from stack314/django-neolith
-
help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
stack314/django-neolith#142 · 1 comment ·
Maintainers usually reply within 1 day
-
help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
stack314/django-neolith#141 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
stack314/django-neolith#140 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
stack314/django-neolith#119 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 86/100
stack314/django-neolith#117 · 2 comments ·
Maintainers usually reply within 1 day
All issues in stack314/django-neolith
Similar issues
-
automated endpoint-dead needs-curation
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
almanac-data/climate-almanac#138 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
OceanDataTools/openrvdas#760 ·
Maintainers usually reply within 1 day
-
level/subtask type/enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
wazuh/wazuh-virtual-machines#1091 ·
Maintainers usually reply within 1 day
-
Python: Bug: ChatMessageContent.from_element drops AudioContent and BinaryContent into raw TextContentPossibly taken @halcyon-past claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
microsoft/semantic-kernel#14824 · 1 comment ·
Maintainers usually reply within 3 days
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
LedgerHQ/app-bitcoin-legacy#306 ·