yopass 2.0.0 → 2.1.0
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/.gemspec +5 -5
- data/.travis.yml +0 -1
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +5 -5
- data/README.md +9 -12
- data/lib/static/flash/clippy.swf +0 -0
- data/lib/views/get_secret.erb +15 -7
- data/lib/views/index.erb +3 -0
- data/lib/views/secret_url.erb +82 -3
- data/lib/yopass.rb +52 -45
- data/spec/bulksms_spec.rb +2 -2
- data/spec/yopass_spec.rb +32 -35
- metadata +16 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d7545346b162a46c0382fd35e5e52c474a47e78f
|
4
|
+
data.tar.gz: 3511540e87a17f20d6e06427ca159311a9962250
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 22e7328dcc0241299bf3fdb4dc39a84d4cc52b645cb217f2fa06becd198d66fd80d68303b4c7fb8a78217410d981d2b04d9d23d73a7dc4a1115fc96689da15a7
|
7
|
+
data.tar.gz: d21e8abb4d6cef79d30c4e3cb6ff1309b885fd3da2087a7f3ffdf2bb511bf36bd84e9f36a3c6b9b6d8f529b0a96554fd3e5b2741ed72f76342480d679473ad3f
|
data/.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
Gem::Specification.new do |s|
|
3
3
|
# Metadata
|
4
4
|
s.name = 'yopass'
|
5
|
-
s.version = '2.
|
5
|
+
s.version = '2.1.0'
|
6
6
|
s.author = 'Johan Haals'
|
7
7
|
s.email = ['jhaals@spotify.com']
|
8
8
|
s.homepage = 'https://github.com/jhaals/yopass'
|
@@ -16,9 +16,9 @@ Gem::Specification.new do |s|
|
|
16
16
|
s.require_paths = ['lib', 'conf']
|
17
17
|
|
18
18
|
# Dependencies
|
19
|
-
s.required_ruby_version = '>= 1.
|
20
|
-
s.add_runtime_dependency 'encryptor'
|
21
|
-
s.add_runtime_dependency 'memcached'
|
22
|
-
s.add_runtime_dependency 'sinatra'
|
19
|
+
s.required_ruby_version = '>= 1.9.3'
|
20
|
+
s.add_runtime_dependency 'encryptor'
|
21
|
+
s.add_runtime_dependency 'memcached'
|
22
|
+
s.add_runtime_dependency 'sinatra'
|
23
23
|
end
|
24
24
|
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,11 +1,17 @@
|
|
1
1
|
# Yopass changelog
|
2
2
|
|
3
|
+
### 2.1.0
|
4
|
+
|
5
|
+
* remove /get part from URLs
|
6
|
+
* copy to clipboard for URLs
|
7
|
+
|
3
8
|
### 2.0.0
|
4
9
|
|
5
10
|
* Rename `http_base_url` to base_url
|
6
11
|
* Move configuration settings to environment variables
|
7
12
|
* Use thin as webserver
|
8
13
|
* Bump rspec version
|
14
|
+
* Drop ruby 1.8.7 support
|
9
15
|
|
10
16
|
### 1.1.5
|
11
17
|
* Ability to configure secret_max_length in yopass.yaml
|
data/Gemfile.lock
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
yopass (
|
5
|
-
encryptor
|
6
|
-
memcached
|
7
|
-
sinatra
|
4
|
+
yopass (2.1.0)
|
5
|
+
encryptor
|
6
|
+
memcached
|
7
|
+
sinatra
|
8
8
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
@@ -14,7 +14,7 @@ GEM
|
|
14
14
|
diff-lcs (1.2.5)
|
15
15
|
encryptor (1.3.0)
|
16
16
|
eventmachine (1.0.3)
|
17
|
-
memcached (1.
|
17
|
+
memcached (1.8.0)
|
18
18
|
multi_json (1.10.1)
|
19
19
|
rack (1.5.2)
|
20
20
|
rack-protection (1.5.3)
|
data/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# YoPass - Share Secrets Securely
|
2
|
-
[](https://travis-ci.org/jhaals/yopass)
|
3
3
|
|
4
4
|
YoPass is a website for sharing secrets in a quick and secure manner.
|
5
5
|
This project is created to minimize the amount of passwords floating around in ticket management systems, IRC logs and emails. YoPass generates a one-time URL with an expiration date so you don't have to worry about passwords being visible forever
|
@@ -11,18 +11,7 @@ This project is created to minimize the amount of passwords floating around in t
|
|
11
11
|
* Secrets self destruct after X hours
|
12
12
|
* Decryption key can be sent over SMS
|
13
13
|
|
14
|
-
#### Workflow
|
15
|
-
* Generate secret/password
|
16
|
-
* Paste into the yopass website
|
17
|
-
* Receive URL with or without the decryption key(can be transfered over other channel such as SMS)
|
18
|
-
* Share with the intended person
|
19
|
-
* Secret is automatically removed once viewed
|
20
|
-
* Feel safe
|
21
|
-
|
22
14
|
### Installation / Configuration
|
23
|
-
YoPass Docker container available [here](https://hub.docker.com/u/jhaals/yopass)
|
24
|
-
|
25
|
-
Otherwise:
|
26
15
|
|
27
16
|
gem install yopass
|
28
17
|
|
@@ -36,6 +25,14 @@ Most settings can be configured with environment variables.
|
|
36
25
|
YOPASS_BASE_URL='https://yopass.mydomain.com'
|
37
26
|
YOPASS_MEMCACHED_URL='memcached_address'
|
38
27
|
|
28
|
+
|
29
|
+
### Run in docker container
|
30
|
+
YoPass Docker container available [here](https://hub.docker.com/u/jhaals/yopass)
|
31
|
+
|
32
|
+
make sure to change `YOPASS_BASE_URL`
|
33
|
+
|
34
|
+
docker run -e "RACK_ENV=production" -e "YOPASS_BASE_URL=http://192.168.59.105:4567" -p 4567:4567 -d jhaals/yopass
|
35
|
+
|
39
36
|
### SMS providers
|
40
37
|
|
41
38
|
Lacking your SMS provider? Just fork the repo and submit a pull request.
|
Binary file
|
data/lib/views/get_secret.erb
CHANGED
@@ -1,23 +1,31 @@
|
|
1
1
|
<%= erb :header %>
|
2
|
-
<form role="form" method="get" autocomplete="off">
|
3
2
|
<p>This secret require a decryption key. Please enter it in the field below</p>
|
4
3
|
<div class="ui form segment">
|
5
4
|
<div class="field">
|
6
5
|
<label>Decryption key</label>
|
7
6
|
<div class="ui left labeled icon input">
|
8
|
-
<input type="
|
7
|
+
<input type="text" name="p" id="p">
|
9
8
|
<i class="lock icon"></i>
|
10
9
|
<div class="ui corner label">
|
11
10
|
<i class="icon asterisk"></i>
|
12
11
|
</div>
|
13
12
|
</div>
|
14
13
|
</div>
|
15
|
-
<input type="hidden" name="k" value="<%=key%>" hidden="true">
|
14
|
+
<input type="hidden" id="k" name="k" value="<%=key%>" hidden="true">
|
16
15
|
<div class="ui error message">
|
17
16
|
<div class="header">We noticed some issues</div>
|
18
17
|
</div>
|
19
|
-
|
18
|
+
<button id="redirect" type="submit" class="ui blue submit button">Decrypt Secret</button>
|
20
19
|
</div>
|
21
|
-
|
22
|
-
|
23
|
-
|
20
|
+
<script>
|
21
|
+
$(document).ready(function() {
|
22
|
+
$("#redirect").click(function() {
|
23
|
+
var key = $("#k").val()
|
24
|
+
var decryption_key = $("#p").val()
|
25
|
+
if(key && decryption_key) {
|
26
|
+
window.location.href = key + '/' + decryption_key;
|
27
|
+
};
|
28
|
+
});
|
29
|
+
})
|
30
|
+
</script>
|
31
|
+
<%= erb :footer %>
|
data/lib/views/index.erb
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
<%= erb :header %>
|
2
2
|
|
3
3
|
<div class="ui form segment">
|
4
|
+
<% if !error.nil? %>
|
5
|
+
<div class="ui red message"><%=error%></div>
|
6
|
+
<% end %>
|
4
7
|
<div class="ui error message"></div>
|
5
8
|
<p>Submit your secret and receive a one time view url</p>
|
6
9
|
<form role="form" method="post">
|
data/lib/views/secret_url.erb
CHANGED
@@ -1,8 +1,87 @@
|
|
1
1
|
<%= erb :header %>
|
2
2
|
<h2>URL for your secret</h2>
|
3
|
-
|
4
|
-
<
|
3
|
+
Your secret can only be viewed ONCE, do not open the URL yourself
|
4
|
+
<table class="ui basic table">
|
5
|
+
<tbody>
|
6
|
+
<tr>
|
7
|
+
<td>URL with decryption key</td>
|
8
|
+
<td><%=full_url%></td>
|
9
|
+
<td>
|
10
|
+
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
|
11
|
+
width="110"
|
12
|
+
height="14"
|
13
|
+
id="clippy" >
|
14
|
+
<param name="movie" value="/flash/clippy.swf"/>
|
15
|
+
<param name="allowScriptAccess" value="always" />
|
16
|
+
<param name="quality" value="high" />
|
17
|
+
<param name="scale" value="noscale" />
|
18
|
+
<param NAME="FlashVars" value="text=<%=full_url%>">
|
19
|
+
<embed src="/flash/clippy.swf"
|
20
|
+
width="110"
|
21
|
+
height="15"
|
22
|
+
name="clippy"
|
23
|
+
quality="high"
|
24
|
+
allowScriptAccess="always"
|
25
|
+
type="application/x-shockwave-flash"
|
26
|
+
pluginspage="http://www.macromedia.com/go/getflashplayer"
|
27
|
+
FlashVars="text=<%=full_url%>"/>
|
28
|
+
</object>
|
29
|
+
</td>
|
30
|
+
</tr>
|
31
|
+
<tr>
|
32
|
+
<td>URL without decryption key</td>
|
33
|
+
<td><%=short_url%></td>
|
34
|
+
<td>
|
35
|
+
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
|
36
|
+
width="110"
|
37
|
+
height="14"
|
38
|
+
id="clippy" >
|
39
|
+
<param name="movie" value="/flash/clippy.swf"/>
|
40
|
+
<param name="allowScriptAccess" value="always" />
|
41
|
+
<param name="quality" value="high" />
|
42
|
+
<param name="scale" value="noscale" />
|
43
|
+
<param NAME="FlashVars" value="text=<%=short_url%>">
|
44
|
+
<embed src="/flash/clippy.swf"
|
45
|
+
width="110"
|
46
|
+
height="15"
|
47
|
+
name="clippy"
|
48
|
+
quality="high"
|
49
|
+
allowScriptAccess="always"
|
50
|
+
type="application/x-shockwave-flash"
|
51
|
+
pluginspage="http://www.macromedia.com/go/getflashplayer"
|
52
|
+
FlashVars="text=<%=short_url%>"/>
|
53
|
+
</object>
|
54
|
+
</td>
|
55
|
+
</tr>
|
56
|
+
<tr>
|
57
|
+
<td>Decryption key</td>
|
58
|
+
<td><%=decryption_key%></td>
|
59
|
+
<td>
|
60
|
+
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
|
61
|
+
width="110"
|
62
|
+
height="14"
|
63
|
+
id="clippy" >
|
64
|
+
<param name="movie" value="/flash/clippy.swf"/>
|
65
|
+
<param name="allowScriptAccess" value="always" />
|
66
|
+
<param name="quality" value="high" />
|
67
|
+
<param name="scale" value="noscale" />
|
68
|
+
<param NAME="FlashVars" value="text=<%=decryption_key%>">
|
69
|
+
<embed src="/flash/clippy.swf"
|
70
|
+
width="110"
|
71
|
+
height="15"
|
72
|
+
name="clippy"
|
73
|
+
quality="high"
|
74
|
+
allowScriptAccess="always"
|
75
|
+
type="application/x-shockwave-flash"
|
76
|
+
pluginspage="http://www.macromedia.com/go/getflashplayer"
|
77
|
+
FlashVars="text=<%=decryption_key%>"/>
|
78
|
+
</object>
|
79
|
+
</td>
|
80
|
+
</tr>
|
81
|
+
</tbody>
|
82
|
+
</table>
|
83
|
+
|
5
84
|
<% if key_sent_to_mobile %>
|
6
|
-
<p>The decryption key is sent to the receiver via
|
85
|
+
<p>The decryption key is sent to the receiver via SMS, don't forget to provide the URL via another channel</p>
|
7
86
|
<% end %>
|
8
87
|
<%= erb :footer %>
|
data/lib/yopass.rb
CHANGED
@@ -6,6 +6,7 @@ require 'yaml'
|
|
6
6
|
require 'uri'
|
7
7
|
require 'yopass/sms_provider'
|
8
8
|
|
9
|
+
# Share your secrets securely
|
9
10
|
class Yopass < Sinatra::Base
|
10
11
|
configure :development do
|
11
12
|
require 'sinatra/reloader'
|
@@ -23,7 +24,33 @@ class Yopass < Sinatra::Base
|
|
23
24
|
|
24
25
|
get '/' do
|
25
26
|
# display mobile number field if send_sms is true
|
26
|
-
erb :index, :
|
27
|
+
erb :index, locals: { send_sms: settings.config['send_sms'], error: nil }
|
28
|
+
end
|
29
|
+
|
30
|
+
get '/:key' do
|
31
|
+
erb :get_secret, locals: { key: params[:key] }
|
32
|
+
end
|
33
|
+
|
34
|
+
get '/:key/:password' do
|
35
|
+
# Disable all caching
|
36
|
+
headers 'Cache-Control' => 'no-cache, no-store, must-revalidate'
|
37
|
+
headers 'Pragma' => 'no-cache'
|
38
|
+
headers 'Expires' => '0'
|
39
|
+
|
40
|
+
begin
|
41
|
+
result = settings.mc.get params[:key]
|
42
|
+
rescue Memcached::NotFound
|
43
|
+
return erb :'404'
|
44
|
+
end
|
45
|
+
content_type 'text/plain'
|
46
|
+
|
47
|
+
begin
|
48
|
+
result = Encryptor.decrypt(value: result, key: params[:password])
|
49
|
+
rescue OpenSSL::Cipher::CipherError
|
50
|
+
return 'Invalid decryption key'
|
51
|
+
end
|
52
|
+
settings.mc.delete params[:key]
|
53
|
+
result
|
27
54
|
end
|
28
55
|
|
29
56
|
post '/' do
|
@@ -35,28 +62,32 @@ class Yopass < Sinatra::Base
|
|
35
62
|
# calculate lifetime in secounds
|
36
63
|
lifetime_options = { '1w' => 3600 * 24 * 7,
|
37
64
|
'1d' => 3600 * 24,
|
38
|
-
'1h' => 3600
|
39
|
-
|
65
|
+
'1h' => 3600 }
|
66
|
+
|
40
67
|
# Verify that user has posted a valid lifetime
|
41
68
|
return 'Invalid lifetime' unless lifetime_options.include? lifetime
|
42
69
|
return 'No secret submitted' if params[:secret].empty?
|
43
70
|
|
44
71
|
if params[:secret].length >= settings.config['secret_max_length']
|
45
|
-
return
|
72
|
+
return erb :index, locals: {
|
73
|
+
send_sms: settings.config['send_sms'],
|
74
|
+
error: 'This site is meant to store secrets not novels' }
|
46
75
|
end
|
47
76
|
|
48
77
|
# goes in URL
|
49
78
|
key = SecureRandom.hex
|
50
|
-
#
|
51
|
-
|
52
|
-
# encrypt secret with generated
|
53
|
-
data = Encryptor.encrypt(params[:secret], :
|
79
|
+
# decryption_key goes in URL or via SMS if provider is configured
|
80
|
+
decryption_key = SecureRandom.hex[0..8]
|
81
|
+
# encrypt secret with generated decryption_key
|
82
|
+
data = Encryptor.encrypt(params[:secret], key: decryption_key)
|
54
83
|
|
55
84
|
# store secret in memcached
|
56
85
|
begin
|
57
86
|
settings.mc.set key, data, lifetime_options[lifetime]
|
58
87
|
rescue Memcached::ServerIsMarkedDead
|
59
|
-
return
|
88
|
+
return erb :index, locals: {
|
89
|
+
send_sms: settings.config['send_sms'],
|
90
|
+
error: 'Error: Unable to contact memcached' }
|
60
91
|
end
|
61
92
|
|
62
93
|
if settings.config['send_sms'] == true && !params[:mobile_number].nil?
|
@@ -67,44 +98,20 @@ class Yopass < Sinatra::Base
|
|
67
98
|
settings.config['sms::settings'])
|
68
99
|
|
69
100
|
unless params[:mobile_number].empty?
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
:
|
74
|
-
:
|
101
|
+
sms.send(mobile_number, decryption_key)
|
102
|
+
return erb :secret_url, locals: {
|
103
|
+
full_url: URI.join(settings.base_url, key, decryption_key),
|
104
|
+
short_url: URI.join(settings.base_url, "get?k=#{key}"),
|
105
|
+
decryption_key: decryption_key,
|
106
|
+
key_sent_to_mobile: true }
|
75
107
|
end
|
76
108
|
end
|
77
109
|
|
78
|
-
erb :secret_url, :
|
79
|
-
:
|
80
|
-
:
|
110
|
+
erb :secret_url, locals: {
|
111
|
+
full_url: URI.join(settings.base_url, key + '/' + decryption_key),
|
112
|
+
short_url: URI.join(settings.base_url, key),
|
113
|
+
decryption_key: decryption_key,
|
114
|
+
key_sent_to_mobile: false }
|
81
115
|
end
|
82
|
-
|
83
|
-
get '/get' do
|
84
|
-
# No password added
|
85
|
-
return erb :get_secret, :locals => {
|
86
|
-
:key => params[:k] } if params[:p].nil? || params[:p].empty?
|
87
|
-
|
88
|
-
# Disable all caching
|
89
|
-
headers 'Cache-Control' => 'no-cache, no-store, must-revalidate'
|
90
|
-
headers 'Pragma' => 'no-cache'
|
91
|
-
headers 'Expires' => '0'
|
92
|
-
|
93
|
-
begin
|
94
|
-
result = settings.mc.get params[:k]
|
95
|
-
rescue Memcached::NotFound
|
96
|
-
return erb :'404'
|
97
|
-
end
|
98
|
-
content_type 'text/plain'
|
99
|
-
|
100
|
-
begin
|
101
|
-
result = Encryptor.decrypt(:value => result, :key => params[:p])
|
102
|
-
rescue OpenSSL::Cipher::CipherError
|
103
|
-
return 'Invalid decryption key'
|
104
|
-
end
|
105
|
-
settings.mc.delete params[:k]
|
106
|
-
result
|
107
|
-
end
|
108
|
-
|
109
|
-
run! if app_file == $0
|
116
|
+
run! if app_file == $PROGRAM_NAME
|
110
117
|
end
|
data/spec/bulksms_spec.rb
CHANGED
@@ -8,7 +8,7 @@ describe 'bulksms' do
|
|
8
8
|
'username' => 'foobar',
|
9
9
|
'password' => '123',
|
10
10
|
'sender' => 'YoPass')
|
11
|
-
Bulksms.
|
12
|
-
sms.send('467022123', 'decryption_key').
|
11
|
+
allow_any_instance_of(Bulksms).to receive(:send).and_return true
|
12
|
+
expect(sms.send('467022123', 'decryption_key')).to be true
|
13
13
|
end
|
14
14
|
end
|
data/spec/yopass_spec.rb
CHANGED
@@ -1,58 +1,55 @@
|
|
1
|
-
#ENV['RACK_ENV'] = 'test'
|
2
1
|
require 'spec_helper'
|
3
2
|
|
4
3
|
describe 'yopass' do
|
5
4
|
|
6
|
-
it '
|
5
|
+
it 'expect give the website' do
|
7
6
|
get '/'
|
8
|
-
last_response.body.
|
7
|
+
expect(last_response.body).to match(/Share Secrets Securely/)
|
9
8
|
end
|
10
9
|
|
11
|
-
it '
|
12
|
-
post '/',
|
13
|
-
last_response.body.
|
10
|
+
it 'expect complain about invalid lifetime' do
|
11
|
+
post '/', 'lifetime' => 'foo'
|
12
|
+
expect(last_response.body).to match(/Invalid lifetime/)
|
14
13
|
end
|
15
14
|
|
16
|
-
it '
|
17
|
-
post '/',
|
18
|
-
last_response.body.
|
15
|
+
it 'expect complain about missing secret' do
|
16
|
+
post '/', 'lifetime' => '1h', 'secret' => ''
|
17
|
+
expect(last_response.body).to match(/No secret submitted/)
|
19
18
|
end
|
20
19
|
|
21
|
-
it '
|
22
|
-
post '/',
|
23
|
-
last_response.body.
|
20
|
+
it 'expect complain about secret being to long' do
|
21
|
+
post '/', 'lifetime' => '1h', 'secret' => '0' * 1000000
|
22
|
+
expect(last_response.body).to match(/This site is meant to store secrets not novels/)
|
24
23
|
end
|
25
24
|
|
26
|
-
it '
|
27
|
-
Memcached.
|
28
|
-
post '/',
|
29
|
-
last_response.body.
|
25
|
+
it 'expect complain about not being able to connect to memcached' do
|
26
|
+
allow_any_instance_of(Memcached).to receive(:set).and_raise(Memcached::ServerIsMarkedDead)
|
27
|
+
post '/', 'lifetime' => '1h', 'secret' => '0' * 100
|
28
|
+
expect(last_response.body).to match(/Unable to contact memcached/)
|
30
29
|
end
|
31
30
|
|
32
|
-
it '
|
33
|
-
Memcached.
|
34
|
-
post '/',
|
35
|
-
last_response.body.
|
31
|
+
it 'expect store secret' do
|
32
|
+
allow_any_instance_of(Memcached).to receive(:set).and_return true
|
33
|
+
post '/', 'lifetime' => '1h', 'secret' => '0' * 100
|
34
|
+
expect(last_response.body).to match(/http:\/\/127.0.0.1:4567/)
|
36
35
|
end
|
37
36
|
|
38
|
-
it '
|
39
|
-
Memcached.
|
40
|
-
Memcached.
|
41
|
-
get '/
|
42
|
-
last_response.body.
|
37
|
+
it 'expect receive secret' do
|
38
|
+
allow_any_instance_of(Memcached).to receive(:get).and_return("\xD5\x9E\xF7\xB1\xA0\xEC\xD6\xBD\xCA\x00nW\xAD\xB3\xF4\xDA")
|
39
|
+
allow_any_instance_of(Memcached).to receive(:delete).and_return true
|
40
|
+
get '/8937c6de9fb7b0ba9b7652b769743b4e/3af71378a'
|
41
|
+
expect(last_response.body).to match(/hello world/)
|
43
42
|
end
|
44
43
|
|
45
|
-
it '
|
46
|
-
Memcached.
|
47
|
-
get '/
|
48
|
-
last_response.body.
|
44
|
+
it 'expect raise Memcached::NotFound' do
|
45
|
+
allow_any_instance_of(Memcached).to receive(:get).and_raise(Memcached::NotFound)
|
46
|
+
get '/mykey/123'
|
47
|
+
expect(last_response.body).to match(/Secret does not exist/)
|
49
48
|
end
|
50
49
|
|
51
|
-
it '
|
52
|
-
Memcached.
|
53
|
-
|
54
|
-
|
55
|
-
last_response.body.should match /Invalid decryption key/
|
50
|
+
it 'expect complain about invalid decryption key' do
|
51
|
+
allow_any_instance_of(Memcached).to receive(:get).and_return 'data'
|
52
|
+
get '/invalid/123'
|
53
|
+
expect(last_response.body).to match(/Invalid decryption key/)
|
56
54
|
end
|
57
|
-
|
58
55
|
end
|
metadata
CHANGED
@@ -1,57 +1,57 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yopass
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Johan Haals
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: encryptor
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: memcached
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: sinatra
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: '0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: '0'
|
55
55
|
description: Web service for sharing secrets more securely
|
56
56
|
email:
|
57
57
|
- jhaals@spotify.com
|
@@ -73,6 +73,7 @@ files:
|
|
73
73
|
- conf/config.ru
|
74
74
|
- conf/yopass.yaml
|
75
75
|
- config.ru
|
76
|
+
- lib/static/flash/clippy.swf
|
76
77
|
- lib/static/js/jquery.address.js
|
77
78
|
- lib/static/js/jquery.js
|
78
79
|
- lib/static/packaged/css/font.css
|
@@ -132,7 +133,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
132
133
|
requirements:
|
133
134
|
- - '>='
|
134
135
|
- !ruby/object:Gem::Version
|
135
|
-
version: 1.
|
136
|
+
version: 1.9.3
|
136
137
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
137
138
|
requirements:
|
138
139
|
- - '>='
|