sqreen 1.18.1 → 1.18.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -0
  3. data/README.md +1 -1
  4. data/Rakefile +1 -1
  5. data/lib/sqreen-alt.rb +3 -0
  6. data/lib/sqreen.rb +1 -1
  7. data/lib/sqreen/actions.rb +2 -2
  8. data/lib/sqreen/agent.rb +1 -1
  9. data/lib/sqreen/attack_detected.html +1 -1
  10. data/lib/sqreen/backport.rb +3 -0
  11. data/lib/sqreen/backport/original_name.rb +3 -0
  12. data/lib/sqreen/binding_accessor.rb +1 -1
  13. data/lib/sqreen/call_countable.rb +1 -1
  14. data/lib/sqreen/callback_tree.rb +1 -1
  15. data/lib/sqreen/callbacks.rb +1 -1
  16. data/lib/sqreen/capped_queue.rb +2 -1
  17. data/lib/sqreen/condition_evaluator.rb +1 -1
  18. data/lib/sqreen/conditionable.rb +1 -1
  19. data/lib/sqreen/configuration.rb +1 -1
  20. data/lib/sqreen/context.rb +1 -1
  21. data/lib/sqreen/deliveries/batch.rb +1 -1
  22. data/lib/sqreen/deliveries/simple.rb +1 -1
  23. data/lib/sqreen/dependency.rb +1 -1
  24. data/lib/sqreen/dependency/callback.rb +1 -1
  25. data/lib/sqreen/dependency/detector.rb +1 -1
  26. data/lib/sqreen/dependency/hook.rb +1 -1
  27. data/lib/sqreen/dependency/hook_point.rb +1 -1
  28. data/lib/sqreen/dependency/new_relic.rb +1 -1
  29. data/lib/sqreen/dependency/rack.rb +1 -1
  30. data/lib/sqreen/dependency/rails.rb +1 -1
  31. data/lib/sqreen/dependency/sentry.rb +1 -1
  32. data/lib/sqreen/dependency/sinatra.rb +1 -1
  33. data/lib/sqreen/encoding_sanitizer.rb +3 -0
  34. data/lib/sqreen/event.rb +1 -1
  35. data/lib/sqreen/events/attack.rb +1 -1
  36. data/lib/sqreen/events/remote_exception.rb +1 -1
  37. data/lib/sqreen/events/request_record.rb +1 -1
  38. data/lib/sqreen/exception.rb +13 -1
  39. data/lib/sqreen/frameworks.rb +1 -1
  40. data/lib/sqreen/frameworks/generic.rb +1 -1
  41. data/lib/sqreen/frameworks/rails.rb +2 -1
  42. data/lib/sqreen/frameworks/rails3.rb +1 -1
  43. data/lib/sqreen/frameworks/request_recorder.rb +2 -1
  44. data/lib/sqreen/frameworks/sinatra.rb +1 -1
  45. data/lib/sqreen/frameworks/sqreen_test.rb +1 -1
  46. data/lib/sqreen/instrumentation.rb +1 -1
  47. data/lib/sqreen/js/execjs_adapter.rb +3 -0
  48. data/lib/sqreen/js/js_service.rb +3 -0
  49. data/lib/sqreen/js/mini_racer_adapter.rb +3 -0
  50. data/lib/sqreen/log.rb +1 -1
  51. data/lib/sqreen/metrics.rb +1 -1
  52. data/lib/sqreen/metrics/average.rb +1 -1
  53. data/lib/sqreen/metrics/base.rb +1 -1
  54. data/lib/sqreen/metrics/binning.rb +2 -2
  55. data/lib/sqreen/metrics/collect.rb +1 -1
  56. data/lib/sqreen/metrics/sum.rb +1 -1
  57. data/lib/sqreen/metrics_store.rb +1 -1
  58. data/lib/sqreen/middleware.rb +1 -1
  59. data/lib/sqreen/mono_time.rb +3 -0
  60. data/lib/sqreen/payload_creator.rb +1 -1
  61. data/lib/sqreen/performance_notifications.rb +1 -1
  62. data/lib/sqreen/performance_notifications/binned_metrics.rb +2 -2
  63. data/lib/sqreen/performance_notifications/log.rb +1 -1
  64. data/lib/sqreen/performance_notifications/log_performance.rb +1 -1
  65. data/lib/sqreen/performance_notifications/metrics.rb +1 -1
  66. data/lib/sqreen/performance_notifications/newrelic.rb +1 -1
  67. data/lib/sqreen/remote_command.rb +2 -1
  68. data/lib/sqreen/rule_attributes.rb +1 -1
  69. data/lib/sqreen/rule_callback.rb +1 -1
  70. data/lib/sqreen/rules.rb +1 -1
  71. data/lib/sqreen/rules_callbacks.rb +2 -1
  72. data/lib/sqreen/rules_callbacks/binding_accessor_matcher.rb +1 -1
  73. data/lib/sqreen/rules_callbacks/binding_accessor_metrics.rb +1 -1
  74. data/lib/sqreen/rules_callbacks/blacklist_ips.rb +1 -1
  75. data/lib/sqreen/rules_callbacks/count_http_codes.rb +1 -1
  76. data/lib/sqreen/rules_callbacks/crawler_user_agent_matches.rb +1 -1
  77. data/lib/sqreen/rules_callbacks/crawler_user_agent_matches_metrics.rb +1 -1
  78. data/lib/sqreen/rules_callbacks/custom_error.rb +1 -1
  79. data/lib/sqreen/rules_callbacks/devise_auth_track.rb +3 -0
  80. data/lib/sqreen/rules_callbacks/devise_signup_track.rb +3 -0
  81. data/lib/sqreen/rules_callbacks/execjs.rb +1 -1
  82. data/lib/sqreen/rules_callbacks/headers_insert.rb +1 -1
  83. data/lib/sqreen/rules_callbacks/inspect_rule.rb +1 -1
  84. data/lib/sqreen/rules_callbacks/matcher_rule.rb +1 -1
  85. data/lib/sqreen/rules_callbacks/not_found.rb +74 -0
  86. data/lib/sqreen/rules_callbacks/rails_parameters.rb +1 -1
  87. data/lib/sqreen/rules_callbacks/record_request_context.rb +1 -1
  88. data/lib/sqreen/rules_callbacks/reflected_xss.rb +1 -1
  89. data/lib/sqreen/rules_callbacks/regexp_rule.rb +1 -1
  90. data/lib/sqreen/rules_callbacks/run_req_start_actions.rb +2 -2
  91. data/lib/sqreen/rules_callbacks/run_user_actions.rb +2 -2
  92. data/lib/sqreen/rules_callbacks/sdk_auth_track.rb +3 -0
  93. data/lib/sqreen/rules_callbacks/sdk_signup_track.rb +3 -0
  94. data/lib/sqreen/rules_callbacks/shell_env.rb +1 -1
  95. data/lib/sqreen/rules_callbacks/url_matches.rb +1 -1
  96. data/lib/sqreen/rules_callbacks/user_agent_matches.rb +1 -1
  97. data/lib/sqreen/rules_callbacks/waf.rb +43 -2
  98. data/lib/sqreen/rules_signature.rb +1 -1
  99. data/lib/sqreen/runner.rb +1 -1
  100. data/lib/sqreen/runtime_infos.rb +1 -1
  101. data/lib/sqreen/safe_json.rb +1 -1
  102. data/lib/sqreen/sdk.rb +1 -1
  103. data/lib/sqreen/serializer.rb +1 -1
  104. data/lib/sqreen/session.rb +1 -1
  105. data/lib/sqreen/shared_storage.rb +1 -1
  106. data/lib/sqreen/shared_storage23.rb +1 -1
  107. data/lib/sqreen/trie.rb +3 -0
  108. data/lib/sqreen/version.rb +3 -2
  109. data/lib/sqreen/web_server.rb +1 -1
  110. data/lib/sqreen/web_server/generic.rb +1 -1
  111. data/lib/sqreen/web_server/passenger.rb +1 -1
  112. data/lib/sqreen/web_server/puma.rb +1 -1
  113. data/lib/sqreen/web_server/rainbows.rb +1 -1
  114. data/lib/sqreen/web_server/thin.rb +1 -1
  115. data/lib/sqreen/web_server/unicorn.rb +1 -1
  116. data/lib/sqreen/web_server/webrick.rb +1 -1
  117. data/lib/sqreen/worker.rb +1 -1
  118. metadata +8 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8a60b6d82dda8a468ead32c8bf1f450f633cd3093ef9bc5d4de7aecbd29625c1
4
- data.tar.gz: 1bf856cf8bb9a3fc1e363cfbf119459d4656500db3641e367bd40d62fe6b3176
3
+ metadata.gz: 0fe030250caca205c3fed7e6e7c46d9961dfac1f7399fe2cb27b1d21749c928f
4
+ data.tar.gz: a14b036980cb650fce6728141b8f52848770381cd22ffd3a5f63a95401a8a4db
5
5
  SHA512:
6
- metadata.gz: e2f3528dbe5a32798c94c77f60f249b4271502d4be504e2ddaa1137a4af4878c9a59bb9455b4693adfcdde1818dc3d5875fbb218ab12c07e4766df082f5f75ab
7
- data.tar.gz: bd587c43bfed1c1a68c2acaeeab7c78927bb329ed569c5bd4e92af1a0a36c3eb1a002e01273a2505d7c5e30b7df66a0ae4f197ac9a8c472e7c3c1a1e8ac27788
6
+ metadata.gz: 843bd65c121e4c5e39528d70bbdc2748641f853f66bef216c78036fce72dde1c5d8b4f9d893bbb6e62243aaf9818a043bad3d19d065bc66b241c938b4b5fb3f7
7
+ data.tar.gz: 432295babcb8c44adc72d720b6262a08b9a5f29c71fe774d6c5c04b7bdd0542e1a7b0cc108b048acaf28b5b20e761c12f6a01fe91ca7b7bf206daa733c9ac671
@@ -1,3 +1,9 @@
1
+ ## 1.18.2
2
+
3
+ * Improve internal WAF error reporting
4
+ * Update license information
5
+ * Improve runtime performance when handling HTTP 404s
6
+
1
7
  ## 1.18.1
2
8
 
3
9
  * Improve handling of scoped IPv6 addresses
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.io/terms.html
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.io/terms.html
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'
@@ -1 +1,4 @@
1
+ # Copyright (c) 2015 Sqreen. All Rights Reserved.
2
+ # Please refer to our terms for more information: https://www.sqreen.com/terms.html
3
+
1
4
  require "sqreen"
@@ -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.io/terms.html
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'
@@ -1,5 +1,5 @@
1
- # Copyright (c) 2018 Sqreen. All Rights Reserved.
2
- # Please refer to our terms for more information: https://www.sqreen.io/terms.html
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'
@@ -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.io/terms.html
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-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-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 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.io/">dashboard</a> for more information.</p></div></body></html>
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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-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.com/">dashboard</a> for more information.</p></div></body></html>
2
2
 
@@ -1,3 +1,6 @@
1
+ # Copyright (c) 2015 Sqreen. All Rights Reserved.
2
+ # Please refer to our terms for more information: https://www.sqreen.com/terms.html
3
+
1
4
  module Sqreen
2
5
  module Backport
3
6
  end
@@ -1,3 +1,6 @@
1
+ # Copyright (c) 2015 Sqreen. All Rights Reserved.
2
+ # Please refer to our terms for more information: https://www.sqreen.com/terms.html
3
+
1
4
  module Sqreen
2
5
  module Backport
3
6
  module OriginalName
@@ -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.io/terms.html
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.io/terms.html
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
@@ -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.io/terms.html
2
+ # Please refer to our terms for more information: https://www.sqreen.com/terms.html
3
3
 
4
4
  require 'sqreen/log'
5
5
 
@@ -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.io/terms.html
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'
@@ -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.io/terms.html
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.io/terms.html
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'
@@ -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.io/terms.html
2
+ # Please refer to our terms for more information: https://www.sqreen.com/terms.html
3
3
 
4
4
  require 'sqreen/condition_evaluator'
5
5
 
@@ -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.io/terms.html
2
+ # Please refer to our terms for more information: https://www.sqreen.com/terms.html
3
3
 
4
4
  require 'yaml'
5
5
  require 'erb'
@@ -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.io/terms.html
2
+ # Please refer to our terms for more information: https://www.sqreen.com/terms.html
3
3
 
4
4
  module Sqreen
5
5
  # Context
@@ -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.io/terms.html
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.io/terms.html
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'
@@ -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.io/terms.html
2
+ # Please refer to our terms for more information: https://www.sqreen.com/terms.html
3
3
 
4
4
  module Sqreen
5
5
  module Dependency
@@ -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.io/terms.html
2
+ # Please refer to our terms for more information: https://www.sqreen.com/terms.html
3
3
 
4
4
  module Sqreen
5
5
  module Dependency
@@ -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.io/terms.html
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.io/terms.html
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.io/terms.html
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'
@@ -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.io/terms.html
2
+ # Please refer to our terms for more information: https://www.sqreen.com/terms.html
3
3
 
4
4
  module Sqreen
5
5
  module Dependency
@@ -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.io/terms.html
2
+ # Please refer to our terms for more information: https://www.sqreen.com/terms.html
3
3
 
4
4
  module Sqreen
5
5
  module Dependency
@@ -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.io/terms.html
2
+ # Please refer to our terms for more information: https://www.sqreen.com/terms.html
3
3
 
4
4
  module Sqreen
5
5
  module Dependency
@@ -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.io/terms.html
2
+ # Please refer to our terms for more information: https://www.sqreen.com/terms.html
3
3
 
4
4
  module Sqreen
5
5
  module Dependency
@@ -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.io/terms.html
2
+ # Please refer to our terms for more information: https://www.sqreen.com/terms.html
3
3
 
4
4
  module Sqreen
5
5
  module Dependency
@@ -1,3 +1,6 @@
1
+ # Copyright (c) 2015 Sqreen. All Rights Reserved.
2
+ # Please refer to our terms for more information: https://www.sqreen.com/terms.html
3
+
1
4
  module Sqreen
2
5
  class EncodingSanitizer
3
6
  def self.sanitize(obj)
@@ -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.io/terms.html
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)
@@ -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.io/terms.html
2
+ # Please refer to our terms for more information: https://www.sqreen.com/terms.html
3
3
 
4
4
  require 'sqreen/event'
5
5
 
@@ -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.io/terms.html
2
+ # Please refer to our terms for more information: https://www.sqreen.com/terms.html
3
3
 
4
4
  require 'json'
5
5
  require 'sqreen/event'
@@ -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.io/terms.html
2
+ # Please refer to our terms for more information: https://www.sqreen.com/terms.html
3
3
 
4
4
  require 'json'
5
5
  require 'sqreen/event'
@@ -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.io/terms.html
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
@@ -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.io/terms.html
2
+ # Please refer to our terms for more information: https://www.sqreen.com/terms.html
3
3
 
4
4
  module Sqreen
5
5
  @@framework = nil
@@ -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.io/terms.html
2
+ # Please refer to our terms for more information: https://www.sqreen.com/terms.html
3
3
 
4
4
  require 'ipaddr'
5
5
  require 'set'
@@ -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.io/terms.html
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,5 @@
1
1
  # Copyright (c) 2015 Sqreen. All Rights Reserved.
2
- # Please refer to our terms for more information: https://www.sqreen.io/terms.html
2
+ # Please refer to our terms for more information: https://www.sqreen.com/terms.html
3
3
 
4
4
  require 'sqreen/frameworks/rails'
5
5
 
@@ -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.io/terms.html
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.io/terms.html
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.io/terms.html
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
 
@@ -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.io/terms.html
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'
@@ -1,3 +1,6 @@
1
+ # Copyright (c) 2015 Sqreen. All Rights Reserved.
2
+ # Please refer to our terms for more information: https://www.sqreen.com/terms.html
3
+
1
4
  require 'execjs'
2
5
  require 'weakref'
3
6
 
@@ -1,3 +1,6 @@
1
+ # Copyright (c) 2015 Sqreen. All Rights Reserved.
2
+ # Please refer to our terms for more information: https://www.sqreen.com/terms.html
3
+
1
4
  require 'sqreen/exception'
2
5
 
3
6
  module Sqreen
@@ -1,3 +1,6 @@
1
+ # Copyright (c) 2015 Sqreen. All Rights Reserved.
2
+ # Please refer to our terms for more information: https://www.sqreen.com/terms.html
3
+
1
4
  require 'digest'
2
5
  require 'json'
3
6
 
@@ -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.io/terms.html
2
+ # Please refer to our terms for more information: https://www.sqreen.com/terms.html
3
3
 
4
4
  require 'logger'
5
5
  require 'singleton'
@@ -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.io/terms.html
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'
@@ -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.io/terms.html
2
+ # Please refer to our terms for more information: https://www.sqreen.com/terms.html
3
3
 
4
4
  require 'sqreen/metrics/base'
5
5
 
@@ -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.io/terms.html
2
+ # Please refer to our terms for more information: https://www.sqreen.com/terms.html
3
3
 
4
4
  require 'sqreen/exception'
5
5