Forum Discussion
SmartBear_Suppo
Alumni
14 years agoHello,
All fields that are passwords should be masked now. I tried and could not reproduce this issue you have. Maybe you did not typed property expansion properly? It is a bit harder now to be sure if you put right one in masked field. Properties username and password are used for basic authorization.
If you create mock service and put this script in "OnRequest Script" tab:
You should be able to see if request you sent to mock service has set username/password and what are they.
Hope this help, let me know
robert
All fields that are passwords should be masked now. I tried and could not reproduce this issue you have. Maybe you did not typed property expansion properly? It is a bit harder now to be sure if you put right one in masked field. Properties username and password are used for basic authorization.
If you create mock service and put this script in "OnRequest Script" tab:
def authHeader = mockRequest.getRequestHeaders().get('Authorization')
log.info authHeader
if (authHeader != null) {
def st = new StringTokenizer(authHeader.toString());
if (st.hasMoreTokens()) {
def basic = st.nextToken();
if (basic.equalsIgnoreCase("[Basic")) {
String credentials = st.nextToken();
def decoder = new sun.misc.BASE64Decoder();
def userPass = new String(decoder.decodeBuffer(credentials));
// "userID:password".
def p = userPass.indexOf(":");
if (p != -1) {
userID = userPass.substring(0, p);
password = userPass.substring(p+1);
log.info userID
log.info password
}
}
}
}
else
log.info "no pass"
You should be able to see if request you sent to mock service has set username/password and what are they.
Hope this help, let me know
robert