Skip to content

Commit c8c2a27

Browse files
author
Stephin Thomas
authored
INTLY-9715- Sanitize username (#615)
1 parent f44f493 commit c8c2a27

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/common/serviceInstanceHelpers.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import get from 'lodash.get';
33
import { REJECTED_ACTION } from '../redux/helpers';
44
import { GET_THREAD } from '../redux/constants/threadConstants';
55
import { SERVICE_TYPES } from '../redux/constants/middlewareConstants';
6+
import { cleanUsername } from './openshiftHelpers';
67

78
class DefaultServiceInstanceTransform {
89
isTransformable() {
@@ -43,8 +44,9 @@ class EnMasseServiceInstanceTransform {
4344

4445
transform(siInfo) {
4546
const defaultTransform = new DefaultServiceInstanceTransform().transform(siInfo);
47+
const safeUsername = cleanUsername(siInfo.username);
4648
defaultTransform.spec.parameters = {
47-
name: siInfo.username,
49+
name: safeUsername,
4850
namespace: siInfo.namespace
4951
};
5052
defaultTransform.spec.clusterServicePlanExternalName = 'standard-unlimited';

0 commit comments

Comments
 (0)