Skip to content

Bug report: Status 500 on content-length >197700 #31

Open
@davepo

Description

@davepo

Describe the bug
I get a status 500 every time I try submitting data > 197700. That's not a specific number, but just my closest frame of reference based on sources used.

To Reproduce
Attempt to bake with the following python function:

def query_cyberchef(source_data):
headers = {
'Content-Type': 'application/json',
}
encodedBytes = base64.urlsafe_b64encode(source_data.encode("utf-8"))
encodedStr = str(encodedBytes, "utf-8")
data = {"input":encodedStr, "recipe":[{ "op": "From Base64","args": ["A-Za-z0-9-_=", 'true'] },{ "op": "Remove whitespace","args": ['true', 'true', 'true', 'true', 'true', 'false'] },{ "op": "CTPH","args": [] }]}
response = requests.post('http://localhost:3000/bake', headers=headers, data=json.dumps(data))
return response

Expected behavior
I would expect a Status code 200 with the has as the CTPH in the response. This works on smaller files and I don't see anything other than the content-length that is different.

Node version:
14.15.5
Same results with 10.23.3

Additional context
Error: failed with status code 500
at ServerResponse.onResFinished (/home/redrobin/CyberChef-server/node_modules/pino-http/logger.js:51:33)
at ServerResponse.emit (events.js:327:22)
at ServerResponse.EventEmitter.emit (domain.js:467:12)
at onFinish (_http_outgoing.js:766:10)
at callback (internal/streams/writable.js:513:21)
at afterWrite (internal/streams/writable.js:466:5)
at afterWriteTick (internal/streams/writable.js:453:10)
at processTicksAndRejections (internal/process/task_queues.js:79:21)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions