sqreen 1.18.1 → 1.18.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +1 -1
- data/Rakefile +1 -1
- data/lib/sqreen-alt.rb +3 -0
- data/lib/sqreen.rb +1 -1
- data/lib/sqreen/actions.rb +2 -2
- data/lib/sqreen/agent.rb +1 -1
- data/lib/sqreen/attack_detected.html +1 -1
- data/lib/sqreen/backport.rb +3 -0
- data/lib/sqreen/backport/original_name.rb +3 -0
- data/lib/sqreen/binding_accessor.rb +1 -1
- data/lib/sqreen/call_countable.rb +1 -1
- data/lib/sqreen/callback_tree.rb +1 -1
- data/lib/sqreen/callbacks.rb +1 -1
- data/lib/sqreen/capped_queue.rb +2 -1
- data/lib/sqreen/condition_evaluator.rb +1 -1
- data/lib/sqreen/conditionable.rb +1 -1
- data/lib/sqreen/configuration.rb +1 -1
- data/lib/sqreen/context.rb +1 -1
- data/lib/sqreen/deliveries/batch.rb +1 -1
- data/lib/sqreen/deliveries/simple.rb +1 -1
- data/lib/sqreen/dependency.rb +1 -1
- data/lib/sqreen/dependency/callback.rb +1 -1
- data/lib/sqreen/dependency/detector.rb +1 -1
- data/lib/sqreen/dependency/hook.rb +1 -1
- data/lib/sqreen/dependency/hook_point.rb +1 -1
- data/lib/sqreen/dependency/new_relic.rb +1 -1
- data/lib/sqreen/dependency/rack.rb +1 -1
- data/lib/sqreen/dependency/rails.rb +1 -1
- data/lib/sqreen/dependency/sentry.rb +1 -1
- data/lib/sqreen/dependency/sinatra.rb +1 -1
- data/lib/sqreen/encoding_sanitizer.rb +3 -0
- data/lib/sqreen/event.rb +1 -1
- data/lib/sqreen/events/attack.rb +1 -1
- data/lib/sqreen/events/remote_exception.rb +1 -1
- data/lib/sqreen/events/request_record.rb +1 -1
- data/lib/sqreen/exception.rb +13 -1
- data/lib/sqreen/frameworks.rb +1 -1
- data/lib/sqreen/frameworks/generic.rb +1 -1
- data/lib/sqreen/frameworks/rails.rb +2 -1
- data/lib/sqreen/frameworks/rails3.rb +1 -1
- data/lib/sqreen/frameworks/request_recorder.rb +2 -1
- data/lib/sqreen/frameworks/sinatra.rb +1 -1
- data/lib/sqreen/frameworks/sqreen_test.rb +1 -1
- data/lib/sqreen/instrumentation.rb +1 -1
- data/lib/sqreen/js/execjs_adapter.rb +3 -0
- data/lib/sqreen/js/js_service.rb +3 -0
- data/lib/sqreen/js/mini_racer_adapter.rb +3 -0
- data/lib/sqreen/log.rb +1 -1
- data/lib/sqreen/metrics.rb +1 -1
- data/lib/sqreen/metrics/average.rb +1 -1
- data/lib/sqreen/metrics/base.rb +1 -1
- data/lib/sqreen/metrics/binning.rb +2 -2
- data/lib/sqreen/metrics/collect.rb +1 -1
- data/lib/sqreen/metrics/sum.rb +1 -1
- data/lib/sqreen/metrics_store.rb +1 -1
- data/lib/sqreen/middleware.rb +1 -1
- data/lib/sqreen/mono_time.rb +3 -0
- data/lib/sqreen/payload_creator.rb +1 -1
- data/lib/sqreen/performance_notifications.rb +1 -1
- data/lib/sqreen/performance_notifications/binned_metrics.rb +2 -2
- data/lib/sqreen/performance_notifications/log.rb +1 -1
- data/lib/sqreen/performance_notifications/log_performance.rb +1 -1
- data/lib/sqreen/performance_notifications/metrics.rb +1 -1
- data/lib/sqreen/performance_notifications/newrelic.rb +1 -1
- data/lib/sqreen/remote_command.rb +2 -1
- data/lib/sqreen/rule_attributes.rb +1 -1
- data/lib/sqreen/rule_callback.rb +1 -1
- data/lib/sqreen/rules.rb +1 -1
- data/lib/sqreen/rules_callbacks.rb +2 -1
- data/lib/sqreen/rules_callbacks/binding_accessor_matcher.rb +1 -1
- data/lib/sqreen/rules_callbacks/binding_accessor_metrics.rb +1 -1
- data/lib/sqreen/rules_callbacks/blacklist_ips.rb +1 -1
- data/lib/sqreen/rules_callbacks/count_http_codes.rb +1 -1
- data/lib/sqreen/rules_callbacks/crawler_user_agent_matches.rb +1 -1
- data/lib/sqreen/rules_callbacks/crawler_user_agent_matches_metrics.rb +1 -1
- data/lib/sqreen/rules_callbacks/custom_error.rb +1 -1
- data/lib/sqreen/rules_callbacks/devise_auth_track.rb +3 -0
- data/lib/sqreen/rules_callbacks/devise_signup_track.rb +3 -0
- data/lib/sqreen/rules_callbacks/execjs.rb +1 -1
- data/lib/sqreen/rules_callbacks/headers_insert.rb +1 -1
- data/lib/sqreen/rules_callbacks/inspect_rule.rb +1 -1
- data/lib/sqreen/rules_callbacks/matcher_rule.rb +1 -1
- data/lib/sqreen/rules_callbacks/not_found.rb +74 -0
- data/lib/sqreen/rules_callbacks/rails_parameters.rb +1 -1
- data/lib/sqreen/rules_callbacks/record_request_context.rb +1 -1
- data/lib/sqreen/rules_callbacks/reflected_xss.rb +1 -1
- data/lib/sqreen/rules_callbacks/regexp_rule.rb +1 -1
- data/lib/sqreen/rules_callbacks/run_req_start_actions.rb +2 -2
- data/lib/sqreen/rules_callbacks/run_user_actions.rb +2 -2
- data/lib/sqreen/rules_callbacks/sdk_auth_track.rb +3 -0
- data/lib/sqreen/rules_callbacks/sdk_signup_track.rb +3 -0
- data/lib/sqreen/rules_callbacks/shell_env.rb +1 -1
- data/lib/sqreen/rules_callbacks/url_matches.rb +1 -1
- data/lib/sqreen/rules_callbacks/user_agent_matches.rb +1 -1
- data/lib/sqreen/rules_callbacks/waf.rb +43 -2
- data/lib/sqreen/rules_signature.rb +1 -1
- data/lib/sqreen/runner.rb +1 -1
- data/lib/sqreen/runtime_infos.rb +1 -1
- data/lib/sqreen/safe_json.rb +1 -1
- data/lib/sqreen/sdk.rb +1 -1
- data/lib/sqreen/serializer.rb +1 -1
- data/lib/sqreen/session.rb +1 -1
- data/lib/sqreen/shared_storage.rb +1 -1
- data/lib/sqreen/shared_storage23.rb +1 -1
- data/lib/sqreen/trie.rb +3 -0
- data/lib/sqreen/version.rb +3 -2
- data/lib/sqreen/web_server.rb +1 -1
- data/lib/sqreen/web_server/generic.rb +1 -1
- data/lib/sqreen/web_server/passenger.rb +1 -1
- data/lib/sqreen/web_server/puma.rb +1 -1
- data/lib/sqreen/web_server/rainbows.rb +1 -1
- data/lib/sqreen/web_server/thin.rb +1 -1
- data/lib/sqreen/web_server/unicorn.rb +1 -1
- data/lib/sqreen/web_server/webrick.rb +1 -1
- data/lib/sqreen/worker.rb +1 -1
- metadata +8 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0fe030250caca205c3fed7e6e7c46d9961dfac1f7399fe2cb27b1d21749c928f
|
4
|
+
data.tar.gz: a14b036980cb650fce6728141b8f52848770381cd22ffd3a5f63a95401a8a4db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 843bd65c121e4c5e39528d70bbdc2748641f853f66bef216c78036fce72dde1c5d8b4f9d893bbb6e62243aaf9818a043bad3d19d065bc66b241c938b4b5fb3f7
|
7
|
+
data.tar.gz: 432295babcb8c44adc72d720b6262a08b9a5f29c71fe774d6c5c04b7bdd0542e1a7b0cc108b048acaf28b5b20e761c12f6a01fe91ca7b7bf206daa733c9ac671
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
Auto protection for you application.
|
4
4
|
|
5
5
|
Copyright (c) 2015 Sqreen. All Rights Reserved.
|
6
|
-
Please refer to our terms for more information: https://www.sqreen.
|
6
|
+
Please refer to our terms for more information: https://www.sqreen.com/terms.html
|
7
7
|
|
8
8
|
## Installation
|
9
9
|
|
data/Rakefile
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# Copyright (c) 2015 Sqreen. All Rights Reserved.
|
2
|
-
# Please refer to our terms for more information: https://www.sqreen.
|
2
|
+
# Please refer to our terms for more information: https://www.sqreen.com/terms.html
|
3
3
|
|
4
4
|
require 'bundler/gem_tasks'
|
5
5
|
require 'rake/testtask'
|
data/lib/sqreen-alt.rb
CHANGED
data/lib/sqreen.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# Copyright (c) 2015 Sqreen. All Rights Reserved.
|
2
|
-
# Please refer to our terms for more information: https://www.sqreen.
|
2
|
+
# Please refer to our terms for more information: https://www.sqreen.com/terms.html
|
3
3
|
|
4
4
|
require 'sqreen/version'
|
5
5
|
require 'sqreen/agent'
|
data/lib/sqreen/actions.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
# Copyright (c)
|
2
|
-
# Please refer to our terms for more information: https://www.sqreen.
|
1
|
+
# Copyright (c) 2015 Sqreen. All Rights Reserved.
|
2
|
+
# Please refer to our terms for more information: https://www.sqreen.com/terms.html
|
3
3
|
|
4
4
|
require 'ipaddr'
|
5
5
|
require 'sqreen/trie'
|
data/lib/sqreen/agent.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# Copyright (c) 2015 Sqreen. All Rights Reserved.
|
2
|
-
# Please refer to our terms for more information: https://www.sqreen.
|
2
|
+
# Please refer to our terms for more information: https://www.sqreen.com/terms.html
|
3
3
|
|
4
4
|
require 'sqreen/version'
|
5
5
|
require 'sqreen/instrumentation'
|
@@ -1,2 +1,2 @@
|
|
1
|
-
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Sqreen has detected an attack.</title> <style>html, body, div, span, h1, a{margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit; vertical-align: baseline}body{background: -webkit-radial-gradient(26% 19%, circle, #fff, #f4f7f9); background: radial-gradient(circle at 26% 19%, #fff, #f4f7f9); display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -ms-flex-line-pack: center; align-content: center; width: 100%; min-height: 100vh; line-height: 1}svg, h1, p{display: block}svg{margin: 0 auto 4vh}h1{font-family: sans-serif; font-weight: 300; font-size: 34px; color: #384886; line-height: normal}p{font-size: 18px; line-height: normal; color: #b8bccc; font-family: sans-serif; font-weight: 300}a{color: #b8bccc}.flex{text-align: center}</style></head><body> <div class="flex"> <svg xmlns="http://www.w3.org/2000/svg" width="230" height="250" viewBox="0 0 230 250" enable-background="new 0 0 230 250"> <style>.st0{opacity: 0.4; filter: url(#a);}.st1{fill: #FFFFFF;}.st2{fill: #B0ACFF;}.st3{fill: #4842B7;}.st4{fill: #1E0936;}</style> <filter id="a" width="151.7%" height="146%" x="-25.8%" y="-16%" filterUnits="objectBoundingBox"> <feOffset dy="14" in="SourceAlpha" result="shadowOffsetOuter1"/> <feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation="13"/> <feColorMatrix in="shadowBlurOuter1" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.05 0"/> </filter> <g class="st0"> <path id="b_2_" d="M202.6 34.9c-.2-1.2-.8-2.1-1.9-2.8-3.8-2-37.9-20.1-85.7-20.1-48.8 0-84.2 19.3-85.7 20.1-1 .6-1.6 1.6-1.8 2.7-14.8 123.2 84.7 176.3 85.7 176.8.6.3 1.2.4 1.8.4.6 0 1.2-.1 1.7-.4 1-.5 100.4-55 85.9-176.7z"/> </g> <path id="b_1_" d="M202.6 34.9c-.2-1.2-.8-2.1-1.9-2.8-3.8-2-37.9-20.1-85.7-20.1-48.8 0-84.2 19.3-85.7 20.1-1 .6-1.6 1.6-1.8 2.7-14.8 123.2 84.7 176.3 85.7 176.8.6.3 1.2.4 1.8.4.6 0 1.2-.1 1.7-.4 1-.5 100.4-55 85.9-176.7z" class="st1"/> <g id="nest-cmyk-indigo"> <ellipse id="sqreen" cx="115.5" cy="69.9" class="st2" rx="12.7" ry="12.7"/> <path id="app" d="M113.6 91.9V71.5L95.5 61.1v18l6.4-3.7c.5 1.1 1 2.2 1.7 3.2L97 82.3l16.6 9.6zm3.7 0l16.6-9.6-6.7-3.9c.7-1 1.3-2 1.7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c0 .3.2.5.5.5h3.4c.3 0 .5-.2.5-.5v-12.6c1.1-1.2 2.8-1.9 4.6-1.9.4 0 .9 0 1.5.2.3.1.6-.1.7-.4l1.3-2.9c.1-.4 0-.7-.2-.8z" class="st4"/> <path id="e" d="M129 124.7c-1.7 1-4.2 2-6.7 2-6 0-10.3-4.4-10.3-9.9 0-5.3 3.7-9.6 9.4-9.6 5.2 0 8.4 4.4 8.4 9 0 .4 0 .9-.1 1.2 0 .3-.3.6-.7.6h-12.5c.5 2.8 2.8 4.5 5.8 4.5 1.7 0 3.4-.5 5.1-1.4.3-.2.6-.1.8.2l1.2 2.6c.1.2 0 .4-.2.6-.2.1-.2.2-.2.2zm-12.4-10h8.5c-.2-1.8-1.9-3.3-3.9-3.3-2.5-.1-4 1.4-4.6 3.3z" class="st4"/> <path id="e_1_" d="M148.7 124.7c-1.7 1-4.2 2-6.7 2-6 0-10.3-4.4-10.3-9.9 0-5.3 3.7-9.6 9.4-9.6 5.2 0 8.4 4.4 8.4 9 0 .4 0 .9-.1 1.2 0 .3-.3.6-.7.6h-12.5c.5 2.8 2.8 4.5 5.8 4.5 1.7 0 3.4-.5 5.1-1.4.3-.2.6-.1.8.2l1.2 2.6c.1.2 0 .4-.2.6-.2.1-.2.2-.2.2zm-12.4-10h8.5c-.2-1.8-1.9-3.3-3.9-3.3-2.5-.1-4 1.4-4.6 3.3z" class="st4"/> <path id="n" d="M151.5 108.5V126c0 .4.3.7.7.7h3.2c.4 0 .7-.3.7-.7v-12.5c1.1-1.2 2.8-1.9 4.6-1.9 2.9 0 4.5 1.6 4.5 4.7v9.7c0 .4.3.7.7.7h3.2c.4 0 .7-.3.7-.7v-10.2c0-5.2-2.9-8.5-8.8-8.5-1.8 0-3.5.6-4.9 1.4v-.1c0-.4-.3-.7-.7-.7h-3.2c-.4-.1-.7.2-.7.6z" class="st4"/> </svg> <h1>Uh Oh! Sqreen has detected an attack.</h1> <p>If you are the application owner, check the Sqreen <a href="https://my.sqreen.
|
1
|
+
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Sqreen has detected an attack.</title> <style>html, body, div, span, h1, a{margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit; vertical-align: baseline}body{background: -webkit-radial-gradient(26% 19%, circle, #fff, #f4f7f9); background: radial-gradient(circle at 26% 19%, #fff, #f4f7f9); display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; -webkit-box-align: center; -ms-flex-align: center; align-items: center; -ms-flex-line-pack: center; align-content: center; width: 100%; min-height: 100vh; line-height: 1}svg, h1, p{display: block}svg{margin: 0 auto 4vh}h1{font-family: sans-serif; font-weight: 300; font-size: 34px; color: #384886; line-height: normal}p{font-size: 18px; line-height: normal; color: #b8bccc; font-family: sans-serif; font-weight: 300}a{color: #b8bccc}.flex{text-align: center}</style></head><body> <div class="flex"> <svg xmlns="http://www.w3.org/2000/svg" width="230" height="250" viewBox="0 0 230 250" enable-background="new 0 0 230 250"> <style>.st0{opacity: 0.4; filter: url(#a);}.st1{fill: #FFFFFF;}.st2{fill: #B0ACFF;}.st3{fill: #4842B7;}.st4{fill: #1E0936;}</style> <filter id="a" width="151.7%" height="146%" x="-25.8%" y="-16%" filterUnits="objectBoundingBox"> <feOffset dy="14" in="SourceAlpha" result="shadowOffsetOuter1"/> <feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation="13"/> <feColorMatrix in="shadowBlurOuter1" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.05 0"/> </filter> <g class="st0"> <path id="b_2_" d="M202.6 34.9c-.2-1.2-.8-2.1-1.9-2.8-3.8-2-37.9-20.1-85.7-20.1-48.8 0-84.2 19.3-85.7 20.1-1 .6-1.6 1.6-1.8 2.7-14.8 123.2 84.7 176.3 85.7 176.8.6.3 1.2.4 1.8.4.6 0 1.2-.1 1.7-.4 1-.5 100.4-55 85.9-176.7z"/> </g> <path id="b_1_" d="M202.6 34.9c-.2-1.2-.8-2.1-1.9-2.8-3.8-2-37.9-20.1-85.7-20.1-48.8 0-84.2 19.3-85.7 20.1-1 .6-1.6 1.6-1.8 2.7-14.8 123.2 84.7 176.3 85.7 176.8.6.3 1.2.4 1.8.4.6 0 1.2-.1 1.7-.4 1-.5 100.4-55 85.9-176.7z" class="st1"/> <g id="nest-cmyk-indigo"> <ellipse id="sqreen" cx="115.5" cy="69.9" class="st2" rx="12.7" ry="12.7"/> <path id="app" d="M113.6 91.9V71.5L95.5 61.1v18l6.4-3.7c.5 1.1 1 2.2 1.7 3.2L97 82.3l16.6 9.6zm3.7 0l16.6-9.6-6.7-3.9c.7-1 1.3-2 1.7-3.2l6.4 3.7v-18l-18.1 10.5v20.5zM96.9 57.6l18.6 10.7L134 57.6 117.3 48v7.6c-.6-.1-1.2-.1-1.8-.1-.6 0-1.2 0-1.8.1V48l-16.8 9.6zm20.2-13.9l20.3 11.7c1 .6 1.6 1.7 1.6 2.8v23.5c0 1.2-.6 2.2-1.6 2.8l-20.3 11.7c-1 .6-2.3.6-3.3 0L93.5 84.5c-1-.6-1.6-1.7-1.6-2.8V58.2c0-1.2.6-2.2 1.6-2.8l20.3-11.7c1-.6 2.3-.6 3.3 0z" class="st3"/> </g> <path id="s" d="M74.6 113c-1.8-1-3.5-1.5-5.2-1.5-1.4 0-2.3.6-2.3 1.5 0 2.7 10.1.4 10.1 7.7 0 3.3-2.9 6-7.6 6-2.1 0-4.7-.5-6.4-1.4l-.1-.1c-.3-.2-.3-.5-.2-.8l1.2-2.7c.1-.3.5-.5.9-.3.1 0 .1.1.2.1 1.5.6 3.1 1 4.6 1 2.2 0 2.9-.6 2.9-1.7 0-3-10.1-.8-10.1-7.7 0-3.1 2.7-5.8 7-5.8 2.1 0 5 .7 6.9 1.8.1 0 .1.1.2.1.3.2.4.5.3.8l-1.2 2.7c-.1.3-.5.5-.9.3h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2.6c.1.2 0 .4-.2.6-.2.1-.2.2-.2.2zm-12.4-10h8.5c-.2-1.8-1.9-3.3-3.9-3.3-2.5-.1-4 1.4-4.6 3.3z" class="st4"/> <path id="n" d="M151.5 108.5V126c0 .4.3.7.7.7h3.2c.4 0 .7-.3.7-.7v-12.5c1.1-1.2 2.8-1.9 4.6-1.9 2.9 0 4.5 1.6 4.5 4.7v9.7c0 .4.3.7.7.7h3.2c.4 0 .7-.3.7-.7v-10.2c0-5.2-2.9-8.5-8.8-8.5-1.8 0-3.5.6-4.9 1.4v-.1c0-.4-.3-.7-.7-.7h-3.2c-.4-.1-.7.2-.7.6z" class="st4"/> </svg> <h1>Uh Oh! Sqreen has detected an attack.</h1> <p>If you are the application owner, check the Sqreen <a href="https://my.sqreen.com/">dashboard</a> for more information.</p></div></body></html>
|
2
2
|
|
data/lib/sqreen/backport.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# Copyright (c) 2015 Sqreen. All Rights Reserved.
|
2
|
-
# Please refer to our terms for more information: https://www.sqreen.
|
2
|
+
# Please refer to our terms for more information: https://www.sqreen.com/terms.html
|
3
3
|
|
4
4
|
require 'strscan'
|
5
5
|
require 'sqreen/exception'
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# Copyright (c) 2015 Sqreen. All Rights Reserved.
|
2
|
-
# Please refer to our terms for more information: https://www.sqreen.
|
2
|
+
# Please refer to our terms for more information: https://www.sqreen.com/terms.html
|
3
3
|
|
4
4
|
module Sqreen
|
5
5
|
# A module that will dynamically had call_counts to the pre/post/failing
|
data/lib/sqreen/callback_tree.rb
CHANGED
data/lib/sqreen/callbacks.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# Copyright (c) 2015 Sqreen. All Rights Reserved.
|
2
|
-
# Please refer to our terms for more information: https://www.sqreen.
|
2
|
+
# Please refer to our terms for more information: https://www.sqreen.com/terms.html
|
3
3
|
|
4
4
|
require 'set'
|
5
5
|
require 'sqreen/shared_storage'
|
data/lib/sqreen/capped_queue.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# Copyright (c) 2015 Sqreen. All Rights Reserved.
|
2
|
-
# Please refer to our terms for more information: https://www.sqreen.
|
2
|
+
# Please refer to our terms for more information: https://www.sqreen.com/terms.html
|
3
|
+
|
3
4
|
module Sqreen
|
4
5
|
# A simple size limited queue.
|
5
6
|
# When trying to enqueue more than the capacity
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# Copyright (c) 2015 Sqreen. All Rights Reserved.
|
2
|
-
# Please refer to our terms for more information: https://www.sqreen.
|
2
|
+
# Please refer to our terms for more information: https://www.sqreen.com/terms.html
|
3
3
|
|
4
4
|
require 'sqreen/binding_accessor'
|
5
5
|
require 'sqreen/exception'
|
data/lib/sqreen/conditionable.rb
CHANGED
data/lib/sqreen/configuration.rb
CHANGED
data/lib/sqreen/context.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# Copyright (c) 2015 Sqreen. All Rights Reserved.
|
2
|
-
# Please refer to our terms for more information: https://www.sqreen.
|
2
|
+
# Please refer to our terms for more information: https://www.sqreen.com/terms.html
|
3
3
|
|
4
4
|
require 'sqreen/deliveries/simple'
|
5
5
|
require 'sqreen/events/remote_exception'
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# Copyright (c) 2015 Sqreen. All Rights Reserved.
|
2
|
-
# Please refer to our terms for more information: https://www.sqreen.
|
2
|
+
# Please refer to our terms for more information: https://www.sqreen.com/terms.html
|
3
3
|
|
4
4
|
require 'sqreen/events/remote_exception'
|
5
5
|
require 'sqreen/events/request_record'
|
data/lib/sqreen/dependency.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# Copyright (c) 2015 Sqreen. All Rights Reserved.
|
2
|
-
# Please refer to our terms for more information: https://www.sqreen.
|
2
|
+
# Please refer to our terms for more information: https://www.sqreen.com/terms.html
|
3
3
|
|
4
4
|
require 'sqreen/dependency/hook'
|
5
5
|
require 'sqreen/dependency/rails'
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# Copyright (c) 2015 Sqreen. All Rights Reserved.
|
2
|
-
# Please refer to our terms for more information: https://www.sqreen.
|
2
|
+
# Please refer to our terms for more information: https://www.sqreen.com/terms.html
|
3
3
|
|
4
4
|
require 'sqreen/dependency/callback'
|
5
5
|
require 'sqreen/dependency/hook_point'
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# Copyright (c) 2015 Sqreen. All Rights Reserved.
|
2
|
-
# Please refer to our terms for more information: https://www.sqreen.
|
2
|
+
# Please refer to our terms for more information: https://www.sqreen.com/terms.html
|
3
3
|
|
4
4
|
require 'sqreen/dependency'
|
5
5
|
require 'sqreen/backport/original_name'
|
data/lib/sqreen/event.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# Copyright (c) 2015 Sqreen. All Rights Reserved.
|
2
|
-
# Please refer to our terms for more information: https://www.sqreen.
|
2
|
+
# Please refer to our terms for more information: https://www.sqreen.com/terms.html
|
3
3
|
|
4
4
|
module Sqreen
|
5
5
|
# Master interface for point in time events (e.g. Attack, RemoteException)
|
data/lib/sqreen/events/attack.rb
CHANGED
data/lib/sqreen/exception.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# Copyright (c) 2015 Sqreen. All Rights Reserved.
|
2
|
-
# Please refer to our terms for more information: https://www.sqreen.
|
2
|
+
# Please refer to our terms for more information: https://www.sqreen.com/terms.html
|
3
3
|
|
4
4
|
require 'sqreen/log'
|
5
5
|
|
@@ -43,4 +43,16 @@ module Sqreen
|
|
43
43
|
|
44
44
|
class Unauthorized < Exception
|
45
45
|
end
|
46
|
+
|
47
|
+
class WAFError < Exception
|
48
|
+
attr_reader :rule_name, :error, :data, :args
|
49
|
+
|
50
|
+
def initialize(rule_name, error, data = nil, args = nil)
|
51
|
+
super(error.to_s)
|
52
|
+
@rule_name = rule_name
|
53
|
+
@error = error
|
54
|
+
@data = data
|
55
|
+
@args = args
|
56
|
+
end
|
57
|
+
end
|
46
58
|
end
|
data/lib/sqreen/frameworks.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
# Copyright (c) 2015 Sqreen. All Rights Reserved.
|
3
|
-
# Please refer to our terms for more information: https://www.sqreen.
|
4
|
+
# Please refer to our terms for more information: https://www.sqreen.com/terms.html
|
4
5
|
|
5
6
|
require 'sqreen/frameworks/generic'
|
6
7
|
require 'sqreen/middleware'
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# Copyright (c) 2015 Sqreen. All Rights Reserved.
|
2
|
-
# Please refer to our terms for more information: https://www.sqreen.
|
2
|
+
# Please refer to our terms for more information: https://www.sqreen.com/terms.html
|
3
|
+
|
3
4
|
require 'set'
|
4
5
|
require 'sqreen/shared_storage'
|
5
6
|
require 'sqreen/events/request_record'
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# Copyright (c) 2015 Sqreen. All Rights Reserved.
|
2
|
-
# Please refer to our terms for more information: https://www.sqreen.
|
2
|
+
# Please refer to our terms for more information: https://www.sqreen.com/terms.html
|
3
3
|
|
4
4
|
require 'sqreen/frameworks/generic'
|
5
5
|
require 'sqreen/middleware'
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# Copyright (c) 2015 Sqreen. All Rights Reserved.
|
2
|
-
# Please refer to our terms for more information: https://www.sqreen.
|
2
|
+
# Please refer to our terms for more information: https://www.sqreen.com/terms.html
|
3
3
|
|
4
4
|
require 'sqreen/callback_tree'
|
5
5
|
require 'sqreen/log'
|
data/lib/sqreen/js/js_service.rb
CHANGED
data/lib/sqreen/log.rb
CHANGED
data/lib/sqreen/metrics.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# Copyright (c) 2015 Sqreen. All Rights Reserved.
|
2
|
-
# Please refer to our terms for more information: https://www.sqreen.
|
2
|
+
# Please refer to our terms for more information: https://www.sqreen.com/terms.html
|
3
3
|
|
4
4
|
require 'sqreen/metrics/collect'
|
5
5
|
require 'sqreen/metrics/average'
|
data/lib/sqreen/metrics/base.rb
CHANGED