Skip to content

Commit

Permalink
INTLY-9715- Sanitize username (#615)
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephin Thomas authored Oct 2, 2020
1 parent f44f493 commit c8c2a27
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/common/serviceInstanceHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import get from 'lodash.get';
import { REJECTED_ACTION } from '../redux/helpers';
import { GET_THREAD } from '../redux/constants/threadConstants';
import { SERVICE_TYPES } from '../redux/constants/middlewareConstants';
import { cleanUsername } from './openshiftHelpers';

class DefaultServiceInstanceTransform {
isTransformable() {
Expand Down Expand Up @@ -43,8 +44,9 @@ class EnMasseServiceInstanceTransform {

transform(siInfo) {
const defaultTransform = new DefaultServiceInstanceTransform().transform(siInfo);
const safeUsername = cleanUsername(siInfo.username);
defaultTransform.spec.parameters = {
name: siInfo.username,
name: safeUsername,
namespace: siInfo.namespace
};
defaultTransform.spec.clusterServicePlanExternalName = 'standard-unlimited';
Expand Down

0 comments on commit c8c2a27

Please sign in to comment.