yopass 1.1.4 → 1.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gemspec +1 -1
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +1 -1
- data/conf/yopass.yaml +2 -1
- data/lib/yopass.rb +4 -1
- data/spec/yopass_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e9a6c2a4561259f563d42908ea873ee9973d7f3
|
4
|
+
data.tar.gz: b62837a06bf2d3d7ecbcccd9a19ba18375054754
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb5c72008630dd778ff72c14bfcf12ca03b8669312f4558744f19f5e91e61a1088a693a6c7c80d22cee1334a0bd16df25b7b27bbd9806dff6f6ae0e40f121bcc
|
7
|
+
data.tar.gz: 5184c9de38f5b2aabe94dcfb319cb2ba424fa55cd74b8e993d72c0148f3ce7c69390082c831bc57d945a456e3ab9200960aaf1389e8424967c739b361cd7b647
|
data/.gemspec
CHANGED
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/conf/yopass.yaml
CHANGED
data/lib/yopass.rb
CHANGED
@@ -42,7 +42,10 @@ class Yopass < Sinatra::Base
|
|
42
42
|
# Verify that user has posted a valid lifetime
|
43
43
|
return 'Invalid lifetime' unless lifetime_options.include? lifetime
|
44
44
|
return 'No secret submitted' if params[:secret].empty?
|
45
|
-
|
45
|
+
|
46
|
+
if params[:secret].length >= settings.config['secret_max_length']
|
47
|
+
return 'This site is meant to store secrets not novels'
|
48
|
+
end
|
46
49
|
|
47
50
|
# goes in URL
|
48
51
|
key = SecureRandom.hex
|
data/spec/yopass_spec.rb
CHANGED
@@ -19,7 +19,7 @@ describe 'yopass' do
|
|
19
19
|
end
|
20
20
|
|
21
21
|
it 'should complain about secret being to long' do
|
22
|
-
post '/', params={'lifetime' => '1h', 'secret' => "0" *
|
22
|
+
post '/', params={'lifetime' => '1h', 'secret' => "0" * 1000000}
|
23
23
|
last_response.body.should match /This site is meant to store secrets not novels/
|
24
24
|
end
|
25
25
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yopass
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.5
|
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-04-
|
11
|
+
date: 2014-04-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: encryptor
|