Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 847718 Details for
Bug 1051057
LdapExtLoginModule's bindCredential requires vault string to be in a slightly different format than other components
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
potential fix
SECURITY-783.patch (text/plain), 2.30 KB, created by
Derek Horton
on 2014-01-09 16:17:59 UTC
(
hide
)
Description:
potential fix
Filename:
MIME Type:
Creator:
Derek Horton
Created:
2014-01-09 16:17:59 UTC
Size:
2.30 KB
patch
obsolete
>Index: security-jboss-sx/jbosssx/src/test/java/org/jboss/test/security/vault/SecurityVaultUnitTestCase.java >=================================================================== >--- security-jboss-sx/jbosssx/src/test/java/org/jboss/test/security/vault/SecurityVaultUnitTestCase.java (revision 456) >+++ security-jboss-sx/jbosssx/src/test/java/org/jboss/test/security/vault/SecurityVaultUnitTestCase.java (working copy) >@@ -169,6 +169,7 @@ > { > assertFalse(SecurityVaultUtil.isVaultFormat((String)null)); > assertFalse(SecurityVaultUtil.isVaultFormat((char[])null)); >+ assertTrue(SecurityVaultUtil.isVaultFormat("${VAULT::ImaTestBlock::ImaTestAttr::010101")); > } > > private String getMaskedPassword(String pwd, String salt, int iterationCount) throws Exception >@@ -201,4 +202,4 @@ > > return options; > } >-} >\ No newline at end of file >+} >Index: security-spi/spi/src/main/java/org/jboss/security/vault/SecurityVaultUtil.java >=================================================================== >--- security-spi/spi/src/main/java/org/jboss/security/vault/SecurityVaultUtil.java (revision 456) >+++ security-spi/spi/src/main/java/org/jboss/security/vault/SecurityVaultUtil.java (working copy) >@@ -47,7 +47,7 @@ > return false; > } > String str = new String(chars); >- return str.startsWith(VAULT_PREFIX); >+ return isVaultFormat(str); > } > > /** >@@ -58,7 +58,7 @@ > */ > public static boolean isVaultFormat(String str) > { >- return str != null && str.startsWith(VAULT_PREFIX); >+ return str != null && ( str.startsWith(VAULT_PREFIX) || str.startsWith("${"+VAULT_PREFIX) ); > } > > /** >@@ -127,6 +127,8 @@ > > private static String[] tokens(String vaultString) > { >+ vaultString = removeVariableMarkersFromVaultString(vaultString); >+ > StringTokenizer tokenizer = new StringTokenizer(vaultString, "::"); > int length = tokenizer.countTokens(); > String[] tokens = new String[length]; >@@ -138,4 +140,19 @@ > } > return tokens; > } >-} >\ No newline at end of file >+ >+ private static String removeVariableMarkersFromVaultString(String vaultString) >+ { >+ StringBuilder sb = new StringBuilder(vaultString); >+ >+ if( vaultString.startsWith("${") ) { >+ sb.delete(0,2); >+ } >+ >+ if( sb.charAt(sb.length() - 1) == '}' ) { >+ sb.deleteCharAt(sb.length() - 1); >+ } >+ >+ return sb.toString(); >+ } >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1051057
: 847718