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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 570a25ceb9e2e5bc73307fea8905cc2ffc50f8c7
4
- data.tar.gz: 77e15af32283deca585374aef1a7bfb82d1a2581
3
+ metadata.gz: 4e9a6c2a4561259f563d42908ea873ee9973d7f3
4
+ data.tar.gz: b62837a06bf2d3d7ecbcccd9a19ba18375054754
5
5
  SHA512:
6
- metadata.gz: bd90d1ffa4af0f7901bdd61d23137302719002b281825dff2ef35358e5af85c0de34165bcef2e229f6c8f29e5fec6f380e6f9b0d5514e6cd6b5ba3019e367842
7
- data.tar.gz: 03421a1b0608f10bfc4de6ba191c6157e2118afcde79af1ed5536dbddcbcc849c0617d9cf0fae5756ed7a4ac87a36d2033a0d20488597c23c733c757a6ec0e02
6
+ metadata.gz: cb5c72008630dd778ff72c14bfcf12ca03b8669312f4558744f19f5e91e61a1088a693a6c7c80d22cee1334a0bd16df25b7b27bbd9806dff6f6ae0e40f121bcc
7
+ data.tar.gz: 5184c9de38f5b2aabe94dcfb319cb2ba424fa55cd74b8e993d72c0148f3ce7c69390082c831bc57d945a456e3ab9200960aaf1389e8424967c739b361cd7b647
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 = '1.1.4'
5
+ s.version = '1.1.5'
6
6
  s.author = 'Johan Haals'
7
7
  s.email = ['jhaals@spotify.com']
8
8
  s.homepage = 'https://github.com/jhaals/yopass'
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Yopass changelog
2
2
 
3
+ ### 1.1.5
4
+ * Ability to configure secret_max_length in yopass.yaml
5
+
6
+ ### 1.1.4
7
+ * remove gui messup
8
+
3
9
  ### 1.1.3
4
10
 
5
11
  * display placeholder for mobile number in form.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- yopass (1.1.3)
4
+ yopass (1.1.5)
5
5
  encryptor (~> 1.3.0)
6
6
  memcached (~> 1.7.2)
7
7
  sinatra (~> 1.4.4)
data/conf/yopass.yaml CHANGED
@@ -1,7 +1,8 @@
1
1
  memcached_url: 'localhost:11211'
2
2
  http_base_url: 'http://127.0.0.1:4567'
3
-
3
+ secret_max_length: 100000
4
4
  send_sms: false
5
+
5
6
  sms::provider: 'bulksms'
6
7
  sms::settings:
7
8
  username: 'username'
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
- return 'This site is meant to store secrets not novels' if params[:secret].length >= 10000
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" * 10000}
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
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-08 00:00:00.000000000 Z
11
+ date: 2014-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: encryptor