lastpass 1.4.0 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 63a049d06efc466ce9ff2861ba45dc8c0797c0bb
4
+ data.tar.gz: 3d818fcc7316b20729917c5e40edac24a2e6b408
5
+ SHA512:
6
+ metadata.gz: 2ec4ba7d245d8bc025b85f386ae69743db765c8a319436017586465cedfec115f03e454bc8495c5d2e4e14296e0c1b13eca3f5aa0e72851fbdc6bd75554e7548
7
+ data.tar.gz: 4df5d76964fa78f8a1cfcdc14086043dbf2a927249425fe67d4acff71dd7ed0047a5c95bb52e0d29da8d4e207fd59abef54770bdf4bbfa021a24c8887aba2eb8
data/.gitignore CHANGED
@@ -1,4 +1,4 @@
1
- Gemfile.lock
2
- lastpass-*.gem
3
- coverage
4
- example/credentials.yaml
1
+ /pkg/
2
+ /Gemfile.lock
3
+ /coverage
4
+ /example/credentials.yaml
@@ -1,5 +1,7 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 1.9.3
4
3
  - 2.0.0
5
- - 2.1.5
4
+ - 2.1.10
5
+ - 2.2.6
6
+ - 2.3.3
7
+ - 2.4.0
@@ -1,3 +1,12 @@
1
+ Version 1.5.0
2
+ -------------
3
+
4
+ - Fixed failing `get_iteraction_count`. POST parameters are moved from the query (URL) to the body.
5
+ - pbkdf2-ruby gem is no longer used as it was causing problems. Relying on built-in `OpenSSL::PKCS5.pbkdf2_hmac`
6
+ - Minimum supported Ruby version is 2.0.0
7
+ - Dependencies updated to their laters versions
8
+ - Travis CI fixed
9
+
1
10
  Version 1.4.0
2
11
  -------------
3
12
 
data/README.md CHANGED
@@ -1,14 +1,14 @@
1
1
  LastPass Ruby API
2
2
  =================
3
3
 
4
- [![Build Status](https://travis-ci.org/detunized/lastpass-ruby.png?branch=master)](https://travis-ci.org/detunized/lastpass-ruby)
5
- [![Coverage Status](https://coveralls.io/repos/detunized/lastpass-ruby/badge.png?branch=master)](https://coveralls.io/r/detunized/lastpass-ruby?branch=master)
6
- [![Code Climate](https://codeclimate.com/github/detunized/lastpass-ruby.png)](https://codeclimate.com/github/detunized/lastpass-ruby)
7
- [![Dependency Status](https://gemnasium.com/detunized/lastpass-ruby.png)](https://gemnasium.com/detunized/lastpass-ruby)
4
+ [![Build Status](https://travis-ci.org/detunized/lastpass-ruby.svg?branch=master)](https://travis-ci.org/detunized/lastpass-ruby)
5
+ [![Coverage Status](https://coveralls.io/repos/detunized/lastpass-ruby/badge.svg?branch=master)](https://coveralls.io/r/detunized/lastpass-ruby?branch=master)
6
+ [![Code Climate](https://codeclimate.com/github/detunized/lastpass-ruby.svg)](https://codeclimate.com/github/detunized/lastpass-ruby)
7
+ [![Dependency Status](https://gemnasium.com/detunized/lastpass-ruby.svg)](https://gemnasium.com/detunized/lastpass-ruby)
8
8
 
9
9
  **This is unofficial LastPass API.**
10
10
 
11
- There's also [C#/.NET port](https://github.com/detunized/lastpass-sharp) available.
11
+ There are also [a C#/.NET port](https://github.com/detunized/lastpass-sharp) and [a Python port](https://github.com/konomae/lastpass-python) available.
12
12
 
13
13
  This library implements fetching and parsing of LastPass data. The library is
14
14
  still in the proof of concept stage and doesn't support all LastPass features
data/Rakefile CHANGED
@@ -1,6 +1,7 @@
1
1
  # Copyright (C) 2013 Dmitry Yakimenko (detunized@gmail.com).
2
2
  # Licensed under the terms of the MIT license. See LICENCE for details.
3
3
 
4
+ require "bundler/gem_tasks"
4
5
  require "rspec/core/rake_task"
5
6
 
6
7
  task :default => :spec
@@ -12,17 +12,16 @@ Gem::Specification.new do |s|
12
12
  s.email = "detunized@gmail.com"
13
13
  s.homepage = "https://github.com/detunized/lastpass-ruby"
14
14
  s.summary = "Unofficial LastPass API"
15
- s.description = "Unofficial LastPass API"
15
+ s.description = "Read only access to the online LastPass vault"
16
16
 
17
- s.required_ruby_version = ">= 1.9.3"
17
+ s.required_ruby_version = ">= 2.0.0"
18
18
 
19
- s.add_dependency "httparty", "~> 0.13.0"
20
- s.add_dependency "pbkdf2-ruby", "~> 0.2.0"
19
+ s.add_dependency "httparty", "~> 0.14.0"
21
20
 
22
- s.add_development_dependency "rake", "~> 10.4.0"
23
- s.add_development_dependency "rspec", "~> 3.1.0"
24
- s.add_development_dependency "rspec-its", "~> 1.1.0"
25
- s.add_development_dependency "coveralls", "~> 0.7.0"
21
+ s.add_development_dependency "rake", "~> 12.0"
22
+ s.add_development_dependency "rspec", "~> 3.5"
23
+ s.add_development_dependency "rspec-its", "~> 1.2"
24
+ s.add_development_dependency "coveralls", "~> 0.8.19"
26
25
 
27
26
  s.files = `git ls-files`.split "\n"
28
27
  s.test_files = `git ls-files spec`.split "\n"
@@ -4,7 +4,6 @@
4
4
  require "base64"
5
5
  require "httparty"
6
6
  require "openssl"
7
- require "pbkdf2"
8
7
  require "stringio"
9
8
 
10
9
  require "lastpass/account"
@@ -27,7 +27,7 @@ module LastPass
27
27
 
28
28
  def self.request_iteration_count username, web_client = http
29
29
  response = web_client.post "https://lastpass.com/iterations.php",
30
- query: {email: username}
30
+ body: {email: username}
31
31
 
32
32
  raise NetworkError unless response.response.is_a? Net::HTTPOK
33
33
 
@@ -117,13 +117,7 @@ module LastPass
117
117
  if key_iteration_count == 1
118
118
  Digest::SHA256.digest username + password
119
119
  else
120
- PBKDF2
121
- .new(password: password,
122
- salt: username,
123
- iterations: key_iteration_count,
124
- key_length: 32)
125
- .bin_string
126
- .force_encoding "BINARY"
120
+ OpenSSL::PKCS5.pbkdf2_hmac password, username, key_iteration_count, 32, "sha256"
127
121
  end
128
122
  end
129
123
 
@@ -131,12 +125,11 @@ module LastPass
131
125
  if key_iteration_count == 1
132
126
  Digest::SHA256.hexdigest Digest.hexencode(make_key(username, password, 1)) + password
133
127
  else
134
- PBKDF2
135
- .new(password: make_key(username, password, key_iteration_count),
136
- salt: password,
137
- iterations: 1,
138
- key_length: 32)
139
- .hex_string
128
+ Digest.hexencode OpenSSL::PKCS5.pbkdf2_hmac make_key(username, password, key_iteration_count),
129
+ password,
130
+ 1,
131
+ 32,
132
+ "sha256"
140
133
  end
141
134
  end
142
135
 
@@ -2,5 +2,5 @@
2
2
  # Licensed under the terms of the MIT license. See LICENCE for details.
3
3
 
4
4
  module LastPass
5
- VERSION = "1.4.0"
5
+ VERSION = "1.5.0"
6
6
  end
@@ -51,7 +51,7 @@ describe LastPass::Fetcher do
51
51
  describe ".request_iteration_count" do
52
52
  it "makes a POST request" do
53
53
  expect(web_client = double("web_client")).to receive(:post)
54
- .with("https://lastpass.com/iterations.php", query: {email: username})
54
+ .with("https://lastpass.com/iterations.php", body: {email: username})
55
55
  .and_return(http_ok(key_iteration_count.to_s))
56
56
 
57
57
  LastPass::Fetcher.request_iteration_count username, web_client
metadata CHANGED
@@ -1,121 +1,93 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lastpass
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
5
- prerelease:
4
+ version: 1.5.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Dmitry Yakimenko
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2015-01-29 00:00:00.000000000 Z
11
+ date: 2017-02-05 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: httparty
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ~>
17
+ - - "~>"
20
18
  - !ruby/object:Gem::Version
21
- version: 0.13.0
19
+ version: 0.14.0
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ~>
24
+ - - "~>"
28
25
  - !ruby/object:Gem::Version
29
- version: 0.13.0
30
- - !ruby/object:Gem::Dependency
31
- name: pbkdf2-ruby
32
- requirement: !ruby/object:Gem::Requirement
33
- none: false
34
- requirements:
35
- - - ~>
36
- - !ruby/object:Gem::Version
37
- version: 0.2.0
38
- type: :runtime
39
- prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ~>
44
- - !ruby/object:Gem::Version
45
- version: 0.2.0
26
+ version: 0.14.0
46
27
  - !ruby/object:Gem::Dependency
47
28
  name: rake
48
29
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
30
  requirements:
51
- - - ~>
31
+ - - "~>"
52
32
  - !ruby/object:Gem::Version
53
- version: 10.4.0
33
+ version: '12.0'
54
34
  type: :development
55
35
  prerelease: false
56
36
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
37
  requirements:
59
- - - ~>
38
+ - - "~>"
60
39
  - !ruby/object:Gem::Version
61
- version: 10.4.0
40
+ version: '12.0'
62
41
  - !ruby/object:Gem::Dependency
63
42
  name: rspec
64
43
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
44
  requirements:
67
- - - ~>
45
+ - - "~>"
68
46
  - !ruby/object:Gem::Version
69
- version: 3.1.0
47
+ version: '3.5'
70
48
  type: :development
71
49
  prerelease: false
72
50
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
51
  requirements:
75
- - - ~>
52
+ - - "~>"
76
53
  - !ruby/object:Gem::Version
77
- version: 3.1.0
54
+ version: '3.5'
78
55
  - !ruby/object:Gem::Dependency
79
56
  name: rspec-its
80
57
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
58
  requirements:
83
- - - ~>
59
+ - - "~>"
84
60
  - !ruby/object:Gem::Version
85
- version: 1.1.0
61
+ version: '1.2'
86
62
  type: :development
87
63
  prerelease: false
88
64
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
65
  requirements:
91
- - - ~>
66
+ - - "~>"
92
67
  - !ruby/object:Gem::Version
93
- version: 1.1.0
68
+ version: '1.2'
94
69
  - !ruby/object:Gem::Dependency
95
70
  name: coveralls
96
71
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
72
  requirements:
99
- - - ~>
73
+ - - "~>"
100
74
  - !ruby/object:Gem::Version
101
- version: 0.7.0
75
+ version: 0.8.19
102
76
  type: :development
103
77
  prerelease: false
104
78
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
79
  requirements:
107
- - - ~>
80
+ - - "~>"
108
81
  - !ruby/object:Gem::Version
109
- version: 0.7.0
110
- description: Unofficial LastPass API
82
+ version: 0.8.19
83
+ description: Read only access to the online LastPass vault
111
84
  email: detunized@gmail.com
112
85
  executables: []
113
86
  extensions: []
114
87
  extra_rdoc_files: []
115
88
  files:
116
- - .gitignore
117
- - .ruby-version
118
- - .travis.yml
89
+ - ".gitignore"
90
+ - ".travis.yml"
119
91
  - CHANGELOG.md
120
92
  - Gemfile
121
93
  - LICENSE
@@ -150,27 +122,26 @@ files:
150
122
  homepage: https://github.com/detunized/lastpass-ruby
151
123
  licenses:
152
124
  - MIT
125
+ metadata: {}
153
126
  post_install_message:
154
127
  rdoc_options: []
155
128
  require_paths:
156
129
  - lib
157
130
  required_ruby_version: !ruby/object:Gem::Requirement
158
- none: false
159
131
  requirements:
160
- - - ! '>='
132
+ - - ">="
161
133
  - !ruby/object:Gem::Version
162
- version: 1.9.3
134
+ version: 2.0.0
163
135
  required_rubygems_version: !ruby/object:Gem::Requirement
164
- none: false
165
136
  requirements:
166
- - - ! '>='
137
+ - - ">="
167
138
  - !ruby/object:Gem::Version
168
139
  version: '0'
169
140
  requirements: []
170
141
  rubyforge_project:
171
- rubygems_version: 1.8.23.2
142
+ rubygems_version: 2.5.1
172
143
  signing_key:
173
- specification_version: 3
144
+ specification_version: 4
174
145
  summary: Unofficial LastPass API
175
146
  test_files:
176
147
  - spec/account_spec.rb
@@ -1 +0,0 @@
1
- 1.9.3-p551