Giter VIP home page Giter VIP logo

hookbuster's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hookbuster's Issues

Maximum call stack size exceeded

I have built hookbuster into a containerized application and have had the container crash with this trace back a few times.

failed to execute Logger#warn RangeError: Maximum call stack size exceeded
hookbuster_1 | at walkAndFilter (/node_modules/@webex/plugin-logger/dist/logger.js:92:23)
hookbuster_1 | at walkAndFilter (/node_modules/@webex/plugin-logger/dist/logger.js:122:23)

Any help will be appreciated. I am not a JS developer unfortunately but i have some inclination that this might be due to a recursion loop.

Thanks in advance!

Incorrect Content-Length header on POST request with messages containing emoji's or other double-width unicode characters

If hookbuster processes a message containing an Emoji or other double-width unicode characters (emdash, smart quotes, etc) then the Content-Length Header on the generated POST request is smaller than the payload, resulting in truncated json in many web servers.

For example a message containing a single emoji is processed by hookbuster:

INFO: messages:created received
INFO: event forwarded to localhost:8000
INFO: {"createdBy":"<redacted>","orgId":"<redacted>","resource":"messages","ownedBy":"creator","status":"active","created":"2022-06-22T20:05:09.053Z","data":{"id":"<redacted>","roomId":"<redacted>","roomType":"direct","text":"๐Ÿ™„","personId":"<redacted>","personEmail":"<redacted>","html":"<h1>๐Ÿ™„</h1>","created":"2022-06-22T20:05:31.499Z"},"event":"created","actorId":"<redacted>gtYWVkYi1kMjgzZWM1NGY2Mjc"}
statusCode: 200

The web server receives the request, but the body is truncated so that the ending jc"} is missing. I took a packet capture and confirmed that the remaining payload is present in the request, but beyond the 802 bytes set by the content length header.

INFO:root:Starting httpd...

INFO:root:POST request,
Path: /
Headers:
Content-Type: application/json
Content-Length: 802
Host: localhost:8000
Connection: close



Body:
{"createdBy":"<redacted>","orgId":"<redacted>","resource":"messages","ownedBy":"creator","status":"active","created":"2022-06-22T20:05:09.053Z","data":{"id":"<redacted>","roomId":"<redacted>","roomType":"direct","text":"๐Ÿ™„","personId":"<redacted>","personEmail":"<redacted>","html":"<h1>๐Ÿ™„</h1>","created":"2022-06-22T20:05:31.499Z"},"event":"created","actorId":"<redacted>TRlNTgtYWVkYi1kMjgzZWM1NGY2M

127.0.0.1 - - [22/Jun/2022 15:05:35] "POST / HTTP/1.1" 200 -

This discussion on Stack Overflow seems relevant to the issue: https://stackoverflow.com/questions/54369513/how-to-count-the-correct-length-of-a-string-with-emojis-in-javascript

Truncated messages

Hi team, I have noticed that when using hookbuster if a webhook being received with a payload more than 1 MB the internal HTTP POST would have the JSON content as truncated which is triggering an exception in backend code, so is this a known issue ? this is happening mostly when my BOT is sending messages into some space the webhook comes for the BIT messages.

Issues in Listening for Events

I have cloned and followed the same steps, looks like I am having an issue when running in two different machines.|

Not working machine logs
LoggerProxy->warn#NO LOGGER DEFINED
INFO: token authenticated as sushi

Working machine logs
LoggerProxy->warn#NO LOGGER DEFINED
INFO: token authenticated as sushi
INFO: Listening for events from the rooms resource
INFO: Registered handler to forward rooms:created events
INFO: Registered handler to forward rooms:updated events
INFO: Listening for events from the messages resource
INFO: Registered handler to forward messages:created events
INFO: Registered handler to forward messages:deleted events
INFO: Listening for events from the memberships resource
INFO: Registered handler to forward memberships:created events
INFO: Registered handler to forward memberships:updated events
INFO: Registered handler to forward memberships:deleted events
INFO: Listening for events from the attachmentActions resource
INFO: Registered handler to forward attachmentActions:created events

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.