Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
ruby-passwordstate
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LiU IT - Infrastructure
ruby-passwordstate
Commits
11130397
Verified
Commit
11130397
authored
6 years ago
by
Alexander Olofsson
Browse files
Options
Downloads
Patches
Plain Diff
Fix an assortment of connection issues
parent
77d089d9
No related branches found
No related tags found
No related merge requests found
Checking pipeline status
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/passwordstate/client.rb
+1
-1
1 addition, 1 deletion
lib/passwordstate/client.rb
lib/passwordstate/util.rb
+4
-2
4 additions, 2 deletions
lib/passwordstate/util.rb
with
5 additions
and
3 deletions
lib/passwordstate/client.rb
+
1
−
1
View file @
11130397
...
@@ -18,7 +18,7 @@ module Passwordstate
...
@@ -18,7 +18,7 @@ module Passwordstate
@headers
=
DEFAULT_HEADERS
@headers
=
DEFAULT_HEADERS
@auth_data
=
options
.
select
{
|
k
,
_v
|
%i[apikey username password]
.
include?
k
}
@auth_data
=
options
.
select
{
|
k
,
_v
|
%i[apikey username password]
.
include?
k
}
@api_type
=
options
.
fetch
(
:api_type
)
if
options
.
key?
:api_type
@api_type
=
options
.
fetch
(
:api_type
)
if
options
.
key?
:api_type
@timeout
=
options
.
fetch
(
:timeout
,
0
)
@timeout
=
options
.
fetch
(
:timeout
,
15
)
end
end
def
logger
def
logger
...
...
This diff is collapsed.
Click to expand it.
lib/passwordstate/util.rb
+
4
−
2
View file @
11130397
...
@@ -11,7 +11,9 @@ module Net
...
@@ -11,7 +11,9 @@ module Net
password:
password
password:
password
}
}
@ntlm_auth_information
[
:domain
]
=
domain
unless
domain
.
nil?
@ntlm_auth_information
[
:domain
]
=
domain
unless
domain
.
nil?
@ntlm_auth_options
=
{}
@ntlm_auth_options
=
{
ntlmv2:
true
}
@ntlm_auth_options
[
:workstation
]
=
workstation
unless
workstation
.
nil?
@ntlm_auth_options
[
:workstation
]
=
workstation
unless
workstation
.
nil?
end
end
end
end
...
@@ -59,7 +61,7 @@ module Passwordstate
...
@@ -59,7 +61,7 @@ module Passwordstate
if
challenge
&&
res
.
code
==
'401'
if
challenge
&&
res
.
code
==
'401'
type2
=
Net
::
NTLM
::
Message
.
decode64
challenge
type2
=
Net
::
NTLM
::
Message
.
decode64
challenge
type3
=
type2
.
response
(
req
.
ntlm_auth_information
,
req
.
ntlm_auth_options
)
type3
=
type2
.
response
(
req
.
ntlm_auth_information
,
req
.
ntlm_auth_options
.
dup
)
req
[
'authorization'
]
=
'NTLM '
+
type3
.
encode64
req
[
'authorization'
]
=
'NTLM '
+
type3
.
encode64
req
.
body_stream
.
rewind
if
req
.
body_stream
req
.
body_stream
.
rewind
if
req
.
body_stream
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment