Skip to content
This repository was archived by the owner on Feb 12, 2022. It is now read-only.
This repository was archived by the owner on Feb 12, 2022. It is now read-only.

Shouldn't raise InvalidToken exception #36

Open

Description

@davispuh

Currently lib/bot_framework/server.rb raises InvalidToken exception, but it shouldn't because it's perfectly fine to receive invalid requests and should just log and ignore them. Otherwise currently I get a lot of spam like this from exploit scanners...

2019-01-29 07:15:21 +0200: Rack app error handling request { POST /vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php }
#<BotFramework::InvalidToken: BotFramework::InvalidToken>
vendor/bundle/ruby/2.3.0/bundler/gems/botframework-ruby/lib/bot_framework/server.rb:14:in `call'
vendor/bundle/ruby/2.3.0/bundler/gems/botframework-ruby/lib/bot_framework/server.rb:4:in `call'
vendor/bundle/ruby/2.3.0/gems/puma-3.11.3/lib/puma/configuration.rb:225:in `call'
vendor/bundle/ruby/2.3.0/gems/puma-3.11.3/lib/puma/server.rb:624:in `handle_request'
vendor/bundle/ruby/2.3.0/gems/puma-3.11.3/lib/puma/server.rb:438:in `process_client'
vendor/bundle/ruby/2.3.0/gems/puma-3.11.3/lib/puma/server.rb:302:in `block in run'
vendor/bundle/ruby/2.3.0/gems/puma-3.11.3/lib/puma/thread_pool.rb:120:in `block in spawn_thread'

Activity

  1. tachyons commented on Jan 29, 2019

    @tachyons
    Owner

    WDYT about making this configurable

    BotFramework.configure do |config|
      config.app_id = ENV['MICROSOFT_APP_ID']
      config.app_secret = ENV['MICROSOFT_APP_SECRET']
      config.raise_exceptions = false 
    end

    Something like this

  2. davispuh commented on Jan 29, 2019

    @davispuh
    ContributorAuthor

    Looks good 👍 , but it would be even better if could set a Logger instance there and it would log this as debug level and BotFramework could use that logging in other places too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions