hydroponics 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,68 @@
1
+ /*
2
+ * OWASP Enterprise Security API (ESAPI)
3
+ *
4
+ * This file is part of the Open Web Application Security Project (OWASP)
5
+ * Enterprise Security API (ESAPI) project. For details, please see
6
+ * <a href="http://www.owasp.org/index.php/ESAPI">http://www.owasp.org/index.php/ESAPI</a>.
7
+ *
8
+ * Copyright (c) 2008 - The OWASP Foundation
9
+ *
10
+ * The ESAPI is published by OWASP under the BSD license. You should read and accept the
11
+ * LICENSE before you use, modify, and/or redistribute this software.
12
+ */
13
+
14
+ $namespace('Base.esapi.properties');
15
+
16
+ Base.esapi.properties = {
17
+ application: {
18
+ // Change this value to reflect your application, or override it in an application scoped configuration.
19
+ Name: 'ESAPI4JS Base Application'
20
+ },
21
+
22
+ httputilities: {
23
+ cookies: {
24
+ ForceSecure: true
25
+ }
26
+ },
27
+
28
+ logging: {
29
+ Implementation: org.owasp.esapi.reference.logging.Log4JSLogFactory,
30
+ Level: org.owasp.esapi.Logger.ERROR,
31
+ // For a console that pops up in a seperate window
32
+ // Appenders: [ new ConsoleAppender(true) ],
33
+ // To log to a logging service on the server
34
+ // Appenders: [ new AjaxAppender( '/log/' ) ],
35
+ // Default to log nowhere
36
+ Appenders: [ ],
37
+ LogUrl: false,
38
+ LogApplicationName: false,
39
+ EncodingRequired: true
40
+ },
41
+
42
+ encoder: {
43
+ Implementation: org.owasp.esapi.reference.encoding.DefaultEncoder,
44
+ AllowMultipleEncoding: false
45
+ },
46
+
47
+ localization: {
48
+ StandardResourceBundle: ESAPI_Standard_en_US,
49
+ DefaultLocale: 'en-US'
50
+ },
51
+
52
+ validation: {
53
+ Implementation: org.owasp.esapi.reference.validation.DefaultValidator,
54
+ AccountName: '^[a-zA-Z0-9]{3,20}$',
55
+ SafeString: '[a-zA-Z0-9\\-_+]*',
56
+ Email: '^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\\.[a-zA-Z]{2,4}$',
57
+ IPAddress: '^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$',
58
+ URL: '^(ht|f)tp(s?)\\:\\/\\/[0-9a-zA-Z]([-.\\w]*[0-9a-zA-Z])*(:(0-9)*)*(\\/?)([a-zA-Z0-9\\-\\.\\?\\,\\:\\\'\\/\\\\\\+=&amp;%\\$#_]*)?$',
59
+ CreditCard: '^(\\d{4}[- ]?){3}\\d{4}$',
60
+ SSN: '^(?!000)([0-6]\\d{2}|7([0-6]\\d|7[012]))([ -]?)(?!00)\\d\\d\\3(?!0000)\\d{4}$',
61
+ HttpScheme: '^(http|https)$',
62
+ HttpServerName: '^[a-zA-Z0-9_.\\-]*$',
63
+ HttpParameterName: '^[a-zA-Z0-9_]{1,32}$',
64
+ HttpParameterValue: '^[a-zA-Z0-9.\\-\\/+=_ ]*$',
65
+ HttpCookieName: '^[a-zA-Z0-9\\-_]{1,32}$',
66
+ HttpCookieValue: '^[a-zA-Z0-9\\-\\/+=_ ]*$'
67
+ }
68
+ };
@@ -0,0 +1,50 @@
1
+ var ESAPI_Standard_en_US = {
2
+ name: 'ESAPI Standard Messages - US English',
3
+ locale: 'en-US',
4
+ messages: {
5
+ "Test" : "This is test #{testnumber}",
6
+
7
+ // Messages for validation
8
+ "CreditCard.Required.Usr" : "{context}: Input credit card required",
9
+ "CreditCard.Required.Log" : "Input credit card required: context={context}, input={input}",
10
+ "CreditCard.Invalid.Usr" : "{context}: Invalid credit card input",
11
+ "CreditCard.Invalid.Log" : "Invalid credit card input: context={context}, input={input}",
12
+ "Date.Required.Usr" : "{context}: Input date required in {format} format",
13
+ "Date.Required.Log" : "Date required: context={context}, input={input}, format={format}",
14
+ "Date.Invalid.Usr" : "{context}: Invalid date, please use {format} format",
15
+ "Date.Invalid.Log" : "Invalid date: context={context}, input={input}, format={format}",
16
+ "Integer.Required.Usr" : "{context}: Input number required",
17
+ "Integer.Required.Log" : "Input number required: context={context}, input={input}, minValue={minValue}, maxValue={maxValue}",
18
+ "Integer.NaN.Usr" : "{context}: Invalid number",
19
+ "Integer.NaN.Log" : "Invalid number: context={context}, input={input}, minValue={minValue}, maxValue={maxValue}",
20
+ "Integer.MinValue.Usr" : "{context}: Invalid number - Must be greater than {minValue}",
21
+ "Integer.MinValue.Log" : "Invalid number: context={context}, input={input}, minValue={minValue}, maxValue={maxValue}",
22
+ "Integer.MaxValue.Usr" : "{context}: Invalid number - Must be less than {maxValue}",
23
+ "Integer.MaxValue.Log" : "Invalid number: context={context}, input={input}, minValue={minValue}, maxValue={maxValue}",
24
+ "Number.Required.Usr" : "{context}: Input number required",
25
+ "Number.Required.Log" : "Input number required: context={context}, input={input}, minValue={minValue}, maxValue={maxValue}",
26
+ "Number.NaN.Usr" : "{context}: Invalid number",
27
+ "Number.NaN.Log" : "Invalid number: context={context}, input={input}, minValue={minValue}, maxValue={maxValue}",
28
+ "Number.MinValue.Usr" : "{context}: Invalid number - Must be greater than {minValue}",
29
+ "Number.MinValue.Log" : "Invalid number: context={context}, input={input}, minValue={minValue}, maxValue={maxValue}",
30
+ "Number.MaxValue.Usr" : "{context}: Invalid number - Must be less than {maxValue}",
31
+ "Number.MaxValue.Log" : "Invalid number: context={context}, input={input}, minValue={minValue}, maxValue={maxValue}",
32
+ "String.Required.Usr" : "{context}: Input required",
33
+ "String.Required.Log" : "Input required: context={context}, input={input}, original={orig}",
34
+ "String.Whitelist.Usr" : "{context}: Invalid input - Conform to regex {pattern}",
35
+ "String.Whitelist.Log" : "Invalid input - Whitelist validation failed: context={context}, input={input}, original={orig}, pattern={pattern}",
36
+ "String.Blacklist.Usr" : "{context}: Invalid input - Dangerous input matching {pattern} detected",
37
+ "String.Blacklist.Log" : "Invalid input - Blacklist validation failed: context={context}, input={input}, original={orig}, pattern={pattern}",
38
+ "String.MinLength.Usr" : "{context}: Invalid input - Minimum length is {minLength}",
39
+ "String.MinLength.Log" : "Invalid input - Too short: context={context}, input={input}, original={orig}, minLength={minLength}",
40
+ "String.MaxLength.Usr" : "{context}: Invalid input - Maximum length is {maxLength}",
41
+ "String.MaxLength.Log" : "Invalid input - Too long: context={context}, input={input}, original={orig}, maxLength={maxLength}",
42
+
43
+ // Error Messages for Exceptions
44
+ "HTTPUtilities.Cookie.Protocol" : "Cookies disallowed on non http[s] requests. Current protocol: {protocol}",
45
+ "HTTPUtilities.Cookie.UnsafeData" : "Attempt to add unsafe data to cookie (skip mode) - Cookie: {name}={value}",
46
+ "HTTPUtilities.Cookie.CantKill" : "Unable to kill cookie named {name}",
47
+ "Cookie.Name" : "Cookie name \"{name}\" is a reserved token",
48
+ "Cookie.Version" : "Cookie version \"{version}\" is not a valid version. Version must be 0 or 1."
49
+ }
50
+ };
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hydroponics
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 3
10
- version: 0.3.3
9
+ - 4
10
+ version: 0.3.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Tyler Boyd
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-11-03 00:00:00 -04:00
18
+ date: 2010-11-15 00:00:00 -05:00
19
19
  default_executable: hydro
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -139,8 +139,9 @@ files:
139
139
  - VERSION
140
140
  - app/actions/dupe.rb
141
141
  - app/actions/foreigndupe.rb
142
- - app/views/dupe/index.erb
143
- - app/views/foreign_dupe/index.erb
142
+ - app/views/dupe.erb
143
+ - app/views/foreign_dupe.erb
144
+ - app/views/single/index.erb
144
145
  - bin/hydro
145
146
  - config/hydro_app.rb
146
147
  - hydroponics.gemspec
@@ -152,9 +153,15 @@ files:
152
153
  - spec/spec.opts
153
154
  - spec/spec_helper.rb
154
155
  - static/ajax-loader.gif
156
+ - static/dupe.css
155
157
  - static/dupe.js
156
158
  - static/test/dupe_test.js
157
159
  - static/test/index.html
160
+ - static/vendor/esapi4js/esapi-compressed.js
161
+ - static/vendor/esapi4js/lib/log4js-lib.js
162
+ - static/vendor/esapi4js/lib/log4js.js
163
+ - static/vendor/esapi4js/resources/Base.esapi.properties.js
164
+ - static/vendor/esapi4js/resources/i18n/ESAPI_Standard_en_US.properties.js
158
165
  - static/vendor/jquery-ui-1.8.5.custom/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png
159
166
  - static/vendor/jquery-ui-1.8.5.custom/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png
160
167
  - static/vendor/jquery-ui-1.8.5.custom/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png
@@ -1,99 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
- <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
4
-
5
- <head>
6
- <link href="../vendor/jquery-ui-1.8.5.custom/css/smoothness/jquery-ui-1.8.5.custom.css" media="screen" rel="stylesheet" type="text/css" />
7
- <script type="text/javascript" src="../vendor/jquery-ui-1.8.5.custom/js/jquery-1.4.2.min.js"></script>
8
- <script type="text/javascript" src="../vendor/jquery-ui-1.8.5.custom/js/jquery-ui-1.8.5.custom.min.js"></script>
9
- <script type="text/javascript">
10
- $(function(){
11
- $("#slider div").slider({
12
- slide: function(event, ui) {
13
- $("#sliderct").html("<i>" + ui.value + "</i>");
14
- $("button").button("enable");
15
- },
16
- max: 25000,
17
- value: <%= db[@table].count %>
18
- });
19
-
20
- $("button").button();
21
- $("button").button("enable");
22
- $("button").click(function(){
23
- $("#slider div").slider("disable");
24
- $("button").button("disable");
25
- $(".loader").show();
26
- $.ajax({
27
- type: "POST",
28
- url: "/dupe/<%= @table %>",
29
- data: JSON.stringify({
30
- count: $("#slider div").slider("value")
31
- }),
32
- success: function(data, status, xhr) {
33
- $("#sliderct").html("<b>" + data + "</b>");
34
- $("#slider div").slider("enable");
35
- $(".loader").hide();
36
- },
37
- processData: false
38
- });
39
- });
40
- });
41
- </script>
42
- <style type="text/css">
43
- .container {width:950px;margin:0 auto;}
44
- .dupe h3 {
45
- margin: 10px 5px 10px 18px;
46
- color: #444;
47
- float: left;
48
- }
49
- .dupe #slider {
50
- float: left;
51
- width: 352px;
52
- margin: 16px 12px;
53
- }
54
- .dupecontainer {
55
- height: 130px;
56
- width: 501px;
57
- }
58
- .dupe {
59
- height: 106px;
60
- width: 500px;
61
- border: 1px #ddd solid;
62
- }
63
- .dupe #button {
64
- float: right;
65
- margin: 2px 12px;
66
- }
67
- .dupe p {
68
- padding: 50px 18px;
69
- font-size: 12px;
70
- }
71
- h1, h3, p {
72
- font-family: Verdana,Arial,sans-serif
73
- }
74
- .loader {
75
- background-image: url('../ajax-loader.gif');
76
- width: 32px;
77
- height: 16px;
78
- margin-top:16px;
79
- float: left;
80
- }
81
- </style>
82
- <title>Hydroponics <%= settings.version %></title>
83
- </head>
84
-
85
- <body class="container">
86
- <div class="header">
87
- <h1>Hydroponics</h1>
88
- </div>
89
- <div class="dupecontainer">
90
- <div class="dupe">
91
- <h3>Dupe</h3>
92
- <div id='slider'><div></div></div>
93
- <div class="loader" style="display:none;"></div>
94
- <div id='button'><button>Update</button></div>
95
- <p><%= @table.to_s.gsub("_"," ") %>: <span id='sliderct'><%= db[@table].count %></span></p>
96
- </div>
97
- </div>
98
- </body>
99
- </html>
@@ -1,111 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
- <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
4
-
5
- <head>
6
- <link href="../vendor/jquery-ui-1.8.5.custom/css/smoothness/jquery-ui-1.8.5.custom.css" media="screen" rel="stylesheet" type="text/css" />
7
- <script type="text/javascript" src="../vendor/jquery-ui-1.8.5.custom/js/jquery-1.4.2.min.js"></script>
8
- <script type="text/javascript" src="../vendor/jquery-ui-1.8.5.custom/js/jquery-ui-1.8.5.custom.min.js"></script>
9
- <script type="text/javascript">
10
- $(function(){
11
- $("#slider div").slider({
12
- slide: function(event, ui) {
13
- $("#sliderct").html("<i>" + ui.value + "</i>");
14
- $("button").button("enable");
15
- },
16
- max: 25000,
17
- value: <%= db[@table].count %>
18
- });
19
-
20
- $("button").button();
21
- $("button").button("enable");
22
- $("button").click(function(){
23
- $("#slider div").slider("disable");
24
- $("button").button("disable");
25
- $(".loader").show();
26
-
27
- var postData = {
28
- count: $("#slider div").slider("value"),
29
- foreign_table: "<%= params[:foreign_table] %>"
30
- };
31
- if($("#foreign_key").val() != "") {
32
- postData.foreign_key = $("#foreign_key").val()
33
- }
34
-
35
- $.ajax({
36
- type: "POST",
37
- url: "/foreign_dupe/<%= @table %>",
38
- data: JSON.stringify(postData),
39
- success: function(data, status, xhr) {
40
- $("#sliderct").html("<b>" + data + "</b>");
41
- $("#slider div").slider("enable");
42
- $(".loader").hide();
43
- },
44
- processData: false
45
- });
46
- });
47
- });
48
- </script>
49
- <style type="text/css">
50
- .container {width:950px;margin:0 auto;}
51
- .dupe h3 {
52
- margin: 10px 5px 10px 18px;
53
- color: #444;
54
- float: left;
55
- }
56
- .dupe #slider {
57
- float: left;
58
- width: 252px;
59
- margin: 16px 12px;
60
- }
61
- .dupecontainer {
62
- height: 130px;
63
- width: 501px;
64
- }
65
- .dupe {
66
- height: 106px;
67
- width: 500px;
68
- border: 1px #ddd solid;
69
- }
70
- .dupe #button {
71
- float: right;
72
- margin: 2px 12px;
73
- }
74
- .dupe p {
75
- padding: 50px 18px;
76
- font-size: 12px;
77
- }
78
- h1, h3, p {
79
- font-family: Verdana,Arial,sans-serif
80
- }
81
- .loader {
82
- background-image: url('../ajax-loader.gif');
83
- width: 32px;
84
- height: 16px;
85
- margin-top:16px;
86
- float: left;
87
- }
88
- .dupe input {
89
- float: right;
90
- margin-top: 12px;
91
- }
92
- </style>
93
- <title>Hydroponics <%= settings.version %></title>
94
- </head>
95
-
96
- <body class="container">
97
- <div class="header">
98
- <h1>Hydroponics</h1>
99
- </div>
100
- <div class="dupecontainer">
101
- <div class="dupe">
102
- <h3>Foreign Dupe</h3>
103
- <div id='slider'><div></div></div>
104
- <div class="loader" style="display:none;"></div>
105
- <div id='button'><button>Update</button></div>
106
- <input id='foreign_key'></input>
107
- <p><%= @table.to_s.gsub("_"," ") %>: <span id='sliderct'><%= db[@table].count %></span></p>
108
- </div>
109
- </div>
110
- </body>
111
- </html>