You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by sjcorbett <gi...@git.apache.org> on 2017/01/17 19:20:49 UTC
[GitHub] brooklyn-server pull request #524: Misc improvements
GitHub user sjcorbett opened a pull request:
https://github.com/apache/brooklyn-server/pull/524
Misc improvements
A bunch of things I've found useful.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/sjcorbett/brooklyn-server changes2
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/brooklyn-server/pull/524.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #524
----
commit cfd5b51c415e77bedd4364981f14d41581481cfb
Author: Sam Corbett <sa...@cloudsoftcorp.com>
Date: 2016-12-22T19:32:51Z
Miscellany
* Relax the generics on BasicJcloudsLocationCustomizer's constructor
* Typos
* SshCommandSensor calls entity.addFeed with itself
* Delete unused test class
* Better toString in WebAppContextProvider
* JcloudsLocation temporary ssh locations respect configured ssh tools
commit 61ea6ee697d1730b8d59ba151dfba735865a110b
Author: Sam Corbett <sa...@cloudsoftcorp.com>
Date: 2017-01-16T12:36:19Z
RecordingWinRm+SshTool give better error messages when there were no execs
commit 0b6ef8869af1d4e29124e51a8a9950d9222fa70c
Author: Sam Corbett <sa...@cloudsoftcorp.com>
Date: 2017-01-16T17:19:35Z
Override more config in AbstractJcloudsStubbedUnitTest
Mostly useful for tests that want to provide a different predicate for
testing reachability.
commit 6b16f807c6c1fa6c176be97b7a376d93306351b0
Author: Sam Corbett <sa...@cloudsoftcorp.com>
Date: 2017-01-17T17:24:27Z
No need to wrap log message in try catch
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] brooklyn-server pull request #524: Misc improvements
Posted by sjcorbett <gi...@git.apache.org>.
Github user sjcorbett commented on a diff in the pull request:
https://github.com/apache/brooklyn-server/pull/524#discussion_r96843229
--- Diff: rest/rest-server/src/main/java/org/apache/brooklyn/rest/filter/BrooklynPropertiesSecurityFilter.java ---
@@ -148,8 +148,11 @@ protected boolean authenticate(HttpServletRequest request) {
String authorization = request.getHeader("Authorization");
if (authorization != null) {
String userpass = new String(Base64.decodeBase64(authorization.substring(6)));
- user = userpass.substring(0, userpass.indexOf(":"));
- pass = userpass.substring(userpass.indexOf(":") + 1);
+ int idxColon = userpass.indexOf(":");
+ if (idxColon >= 0) {
+ user = userpass.substring(0, idxColon);
+ pass = userpass.substring(idxColon + 1);
+ }
--- End diff --
Good point. It should just return false (i.e. unauthorised).
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] brooklyn-server issue #524: Misc improvements
Posted by geomacy <gi...@git.apache.org>.
Github user geomacy commented on the issue:
https://github.com/apache/brooklyn-server/pull/524
\U0001f44d lgtm, merging.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] brooklyn-server pull request #524: Misc improvements
Posted by geomacy <gi...@git.apache.org>.
Github user geomacy commented on a diff in the pull request:
https://github.com/apache/brooklyn-server/pull/524#discussion_r96841464
--- Diff: rest/rest-server/src/main/java/org/apache/brooklyn/rest/filter/BrooklynPropertiesSecurityFilter.java ---
@@ -148,8 +148,11 @@ protected boolean authenticate(HttpServletRequest request) {
String authorization = request.getHeader("Authorization");
if (authorization != null) {
String userpass = new String(Base64.decodeBase64(authorization.substring(6)));
- user = userpass.substring(0, userpass.indexOf(":"));
- pass = userpass.substring(userpass.indexOf(":") + 1);
+ int idxColon = userpass.indexOf(":");
+ if (idxColon >= 0) {
+ user = userpass.substring(0, idxColon);
+ pass = userpass.substring(idxColon + 1);
+ }
--- End diff --
previously you'd have got an index-out-of-bounds exception if the request had an invalid auth string without a colon (not likely perhaps but not impossible); like this it will just leave user and pass empty and try to authenticate with them. Would it be worth throwing a more explanatory exception here?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] brooklyn-server pull request #524: Misc improvements
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/brooklyn-server/pull/524
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---