This repository has been archived by the owner on Aug 29, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 208
Bug 927425 - The use_authorization_tokens flag should be strict #346
Merged
openshift-bot
merged 1 commit into
openshift:master
from
smarterclayton:bug_927425_use_authorization_tokens_not_strict_enough
Mar 29, 2013
Merged
Bug 927425 - The use_authorization_tokens flag should be strict #346
openshift-bot
merged 1 commit into
openshift:master
from
smarterclayton:bug_927425_use_authorization_tokens_not_strict_enough
Mar 29, 2013
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Currently stored tokens are used if use_authorization_tokens is nil or false, or if the user passes --rhlogin and --password. In both of these cases, the token should be ignored. Removed token context helper and replaced it with a helper method "token_for_user" which is called in the commands as needed. Also, RHC::Auth::Token is not used unless use_authorization_tokens is true or --token is passed, AND a user/password isn't provided.
@@ -232,7 +232,7 @@ def self.fill_arguments(cmd, options, args_metadata, options_metadata, args) | |||
Commander::Runner.instance.options.each do |opt| | |||
if opt[:context] | |||
arg = Commander::Runner.switch_to_sym(opt[:switches].last) | |||
options[arg] ||= lambda{ cmd.send(opt[:context]) } | |||
options.__hash__[arg] ||= lambda{ cmd.send(opt[:context]) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
options[arg] evaluates the proc, so we need to avoid that by going direct to the source.
Reviewed, [merge] |
Online Merge Results: SUCCESS (https://ci.dev.openshift.redhat.com/jenkins/job/merge_pull_requests/2204/) (Image: devenv_3017) |
[Test]ing while waiting on the merge queue |
Online Test Results: SUCCESS (https://ci.dev.openshift.redhat.com/jenkins/job/test_pull_requests/1617/) |
Evaluated for online up to baa431b |
Origin Test Results: Waiting: Determining build queue position |
Evaluated for origin up to baa431b |
Origin Test Results: FAILURE (https://originci-openshift.rhcloud.com/job/test_pull_requests/711/) |
openshift-bot
pushed a commit
that referenced
this pull request
Mar 29, 2013
…ion_tokens_not_strict_enough Merged by openshift-bot
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently stored tokens are used if use_authorization_tokens is nil or false,
or if the user passes --rhlogin and --password. In both of these cases, the
token should be ignored.
Removed token context helper and replaced it with a helper method
"token_for_user" which is called in the commands as needed. Also,
RHC::Auth::Token is not used unless use_authorization_tokens is true or
--token is passed, AND a user/password isn't provided.