rabid 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/docs/CHANGELOG.md +4 -0
- data/docs/_coverpage.md +1 -1
- data/docs/pages/publishing.md +1 -1
- data/docs/yard/BigIPCookie/Decode.html +4 -4
- data/docs/yard/BigIPCookie.html +2 -2
- data/docs/yard/Version.html +3 -3
- data/docs/yard/_index.html +2 -2
- data/docs/yard/file.LICENSE.html +2 -2
- data/docs/yard/file.README.html +2 -2
- data/docs/yard/index.html +2 -2
- data/docs/yard/top-level-namespace.html +2 -2
- data/lib/bigipcookie/version.rb +1 -1
- data/lib/bigipcookie.rb +3 -3
- data/test/test_bigipcookie.rb +11 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc6129ff43ec4e9cf11036b001c0dbd6526089038692a7f30708f62249933efe
|
4
|
+
data.tar.gz: 715442b0e16c1148450038d5582ffcb87188a054b5659582a8caf3196fc2fca0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a41f95d9ca6bf5070251ece01ff2e118788e96f703b51b77bdf8092333ea356b1641ac8ebcfb47b61b2f2d27aaff27b137052842ce17cdb99c69c74b58dc8df
|
7
|
+
data.tar.gz: a2b796a96e55137452605b5b6b52641d38e577208e5c444d12d14bf9ff9e581b68a4bbea2df49c28d77ee6cdfe65820f0cc18904534662f7be71757dcca06d18
|
data/Gemfile.lock
CHANGED
data/docs/CHANGELOG.md
CHANGED
data/docs/_coverpage.md
CHANGED
data/docs/pages/publishing.md
CHANGED
@@ -748,11 +748,11 @@
|
|
748
748
|
<span class='kw'>if</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\=</span><span class='regexp_end'>/</span></span><span class='period'>.</span><span class='id identifier rubyid_match?'>match?</span><span class='lparen'>(</span><span class='ivar'>@raw_cookie</span><span class='rparen'>)</span> <span class='comment'># if there is a key
|
749
749
|
</span> <span class='kw'>if</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^BIGipServer</span><span class='regexp_end'>/</span></span><span class='period'>.</span><span class='id identifier rubyid_match?'>match?</span><span class='lparen'>(</span><span class='ivar'>@raw_cookie</span><span class='rparen'>)</span> <span class='comment'># if default cookie name
|
750
750
|
</span> <span class='id identifier rubyid_pool_name'>pool_name</span> <span class='op'>=</span> <span class='id identifier rubyid_retrieve_pool_name'>retrieve_pool_name</span>
|
751
|
-
<span class='id identifier rubyid_cookie_value'>cookie_value</span> <span class='op'>=</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^BIGipServer
|
751
|
+
<span class='id identifier rubyid_cookie_value'>cookie_value</span> <span class='op'>=</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^BIGipServer.*?=(.+)</span><span class='regexp_end'>/</span></span><span class='period'>.</span><span class='id identifier rubyid_match'>match</span><span class='lparen'>(</span><span class='ivar'>@raw_cookie</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_captures'>captures</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
|
752
752
|
<span class='id identifier rubyid_decoded_cookie'>decoded_cookie</span> <span class='op'>=</span> <span class='id identifier rubyid_decode_cookie'>decode_cookie</span><span class='lparen'>(</span><span class='id identifier rubyid_cookie_value'>cookie_value</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
|
753
753
|
<span class='ivar'>@pool_name</span> <span class='op'>=</span> <span class='id identifier rubyid_pool_name'>pool_name</span>
|
754
754
|
<span class='kw'>else</span> <span class='comment'># custom cookie name
|
755
|
-
</span> <span class='id identifier rubyid_cookie_value'>cookie_value</span> <span class='op'>=</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'
|
755
|
+
</span> <span class='id identifier rubyid_cookie_value'>cookie_value</span> <span class='op'>=</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>.*?=(.+)</span><span class='regexp_end'>/</span></span><span class='period'>.</span><span class='id identifier rubyid_match'>match</span><span class='lparen'>(</span><span class='ivar'>@raw_cookie</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_captures'>captures</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
|
756
756
|
<span class='id identifier rubyid_decoded_cookie'>decoded_cookie</span> <span class='op'>=</span> <span class='id identifier rubyid_decode_cookie'>decode_cookie</span><span class='lparen'>(</span><span class='id identifier rubyid_cookie_value'>cookie_value</span><span class='comma'>,</span> <span class='id identifier rubyid_opts'>opts</span><span class='rparen'>)</span>
|
757
757
|
<span class='ivar'>@pool_name</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>unknown</span><span class='tstring_end'>'</span></span>
|
758
758
|
<span class='kw'>end</span>
|
@@ -772,9 +772,9 @@
|
|
772
772
|
</div>
|
773
773
|
|
774
774
|
<div id="footer">
|
775
|
-
Generated on Thu Oct 3
|
775
|
+
Generated on Thu Oct 3 11:49:14 2019 by
|
776
776
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
777
|
-
0.9.20 (ruby-2.6.
|
777
|
+
0.9.20 (ruby-2.6.2).
|
778
778
|
</div>
|
779
779
|
|
780
780
|
</div>
|
data/docs/yard/BigIPCookie.html
CHANGED
@@ -149,9 +149,9 @@
|
|
149
149
|
</div>
|
150
150
|
|
151
151
|
<div id="footer">
|
152
|
-
Generated on Thu Oct 3
|
152
|
+
Generated on Thu Oct 3 11:49:14 2019 by
|
153
153
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
154
|
-
0.9.20 (ruby-2.6.
|
154
|
+
0.9.20 (ruby-2.6.2).
|
155
155
|
</div>
|
156
156
|
|
157
157
|
</div>
|
data/docs/yard/Version.html
CHANGED
@@ -100,7 +100,7 @@
|
|
100
100
|
<dt id="VERSION-constant" class="">VERSION =
|
101
101
|
|
102
102
|
</dt>
|
103
|
-
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>0.0.
|
103
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>0.0.4</span><span class='tstring_end'>'</span></span></pre></dd>
|
104
104
|
|
105
105
|
</dl>
|
106
106
|
|
@@ -116,9 +116,9 @@
|
|
116
116
|
</div>
|
117
117
|
|
118
118
|
<div id="footer">
|
119
|
-
Generated on Thu Oct 3
|
119
|
+
Generated on Thu Oct 3 11:49:13 2019 by
|
120
120
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
121
|
-
0.9.20 (ruby-2.6.
|
121
|
+
0.9.20 (ruby-2.6.2).
|
122
122
|
</div>
|
123
123
|
|
124
124
|
</div>
|
data/docs/yard/_index.html
CHANGED
@@ -128,9 +128,9 @@
|
|
128
128
|
</div>
|
129
129
|
|
130
130
|
<div id="footer">
|
131
|
-
Generated on Thu Oct 3
|
131
|
+
Generated on Thu Oct 3 11:49:13 2019 by
|
132
132
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
133
|
-
0.9.20 (ruby-2.6.
|
133
|
+
0.9.20 (ruby-2.6.2).
|
134
134
|
</div>
|
135
135
|
|
136
136
|
</div>
|
data/docs/yard/file.LICENSE.html
CHANGED
@@ -60,9 +60,9 @@
|
|
60
60
|
<div id="content"><div id='filecontents'>The MIT License (MIT)<br/><br/>Copyright (c) 2019 Alexandre ZANNI<br/><br/>Permission is hereby granted, free of charge, to any person obtaining a copy<br/>of this software and associated documentation files (the "Software"), to deal<br/>in the Software without restriction, including without limitation the rights<br/>to use, copy, modify, merge, publish, distribute, sublicense, and/or sell<br/>copies of the Software, and to permit persons to whom the Software is<br/>furnished to do so, subject to the following conditions:<br/><br/>The above copyright notice and this permission notice shall be included in<br/>all copies or substantial portions of the Software.<br/><br/>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR<br/>IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,<br/>FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE<br/>AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER<br/>LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,<br/>OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN<br/>THE SOFTWARE.</div></div>
|
61
61
|
|
62
62
|
<div id="footer">
|
63
|
-
Generated on Thu Oct 3
|
63
|
+
Generated on Thu Oct 3 11:49:13 2019 by
|
64
64
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
65
|
-
0.9.20 (ruby-2.6.
|
65
|
+
0.9.20 (ruby-2.6.2).
|
66
66
|
</div>
|
67
67
|
|
68
68
|
</div>
|
data/docs/yard/file.README.html
CHANGED
@@ -95,9 +95,9 @@
|
|
95
95
|
</div></div>
|
96
96
|
|
97
97
|
<div id="footer">
|
98
|
-
Generated on Thu Oct 3
|
98
|
+
Generated on Thu Oct 3 11:49:13 2019 by
|
99
99
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
100
|
-
0.9.20 (ruby-2.6.
|
100
|
+
0.9.20 (ruby-2.6.2).
|
101
101
|
</div>
|
102
102
|
|
103
103
|
</div>
|
data/docs/yard/index.html
CHANGED
@@ -95,9 +95,9 @@
|
|
95
95
|
</div></div>
|
96
96
|
|
97
97
|
<div id="footer">
|
98
|
-
Generated on Thu Oct 3
|
98
|
+
Generated on Thu Oct 3 11:49:13 2019 by
|
99
99
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
100
|
-
0.9.20 (ruby-2.6.
|
100
|
+
0.9.20 (ruby-2.6.2).
|
101
101
|
</div>
|
102
102
|
|
103
103
|
</div>
|
@@ -102,9 +102,9 @@
|
|
102
102
|
</div>
|
103
103
|
|
104
104
|
<div id="footer">
|
105
|
-
Generated on Thu Oct 3
|
105
|
+
Generated on Thu Oct 3 11:49:13 2019 by
|
106
106
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
107
|
-
0.9.20 (ruby-2.6.
|
107
|
+
0.9.20 (ruby-2.6.2).
|
108
108
|
</div>
|
109
109
|
|
110
110
|
</div>
|
data/lib/bigipcookie/version.rb
CHANGED
data/lib/bigipcookie.rb
CHANGED
@@ -224,7 +224,7 @@ class BigIPCookie
|
|
224
224
|
# cookie name is used or if no cookie key was provided
|
225
225
|
# @return the pool name
|
226
226
|
def retrieve_pool_name
|
227
|
-
pool_name = /BIGipServer(
|
227
|
+
pool_name = /BIGipServer(.*?)=.+/.match(@raw_cookie).captures[0]
|
228
228
|
return pool_name
|
229
229
|
end
|
230
230
|
|
@@ -237,11 +237,11 @@ class BigIPCookie
|
|
237
237
|
if /\=/.match?(@raw_cookie) # if there is a key
|
238
238
|
if /^BIGipServer/.match?(@raw_cookie) # if default cookie name
|
239
239
|
pool_name = retrieve_pool_name
|
240
|
-
cookie_value = /^BIGipServer
|
240
|
+
cookie_value = /^BIGipServer.*?=(.+)/.match(@raw_cookie).captures[0]
|
241
241
|
decoded_cookie = decode_cookie(cookie_value, opts)
|
242
242
|
@pool_name = pool_name
|
243
243
|
else # custom cookie name
|
244
|
-
cookie_value =
|
244
|
+
cookie_value = /.*?=(.+)/.match(@raw_cookie).captures[0]
|
245
245
|
decoded_cookie = decode_cookie(cookie_value, opts)
|
246
246
|
@pool_name = 'unknown'
|
247
247
|
end
|
data/test/test_bigipcookie.rb
CHANGED
@@ -62,4 +62,15 @@ class BigIPCookieTest < Minitest::Test
|
|
62
62
|
# Cookie type
|
63
63
|
assert_equal('Encrypted', bip.cookie_type)
|
64
64
|
end
|
65
|
+
|
66
|
+
def test_encrypted_2
|
67
|
+
bip = BigIPCookie::Decode.new('BIGipServerhttp-pool=!VGVzdCBzdHJpbmcgMiBlcXVhbCBzaWducw==')
|
68
|
+
bip.auto_decode
|
69
|
+
# Decoded cookie
|
70
|
+
assert_equal('Unknown:Encrypted', bip.decoded_cookie)
|
71
|
+
# Pool name
|
72
|
+
assert_equal('http-pool', bip.pool_name)
|
73
|
+
# Cookie type
|
74
|
+
assert_equal('Encrypted', bip.cookie_type)
|
75
|
+
end
|
65
76
|
end
|