Skip to content

Commit 8517705

Browse files
author
Sachin Maheshwari
committed
fix for issue #111
1 parent 1b4195a commit 8517705

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ install_dependency: &install_dependency
1111
install_deploysuite: &install_deploysuite
1212
name: Installation of install_deploysuite.
1313
command: |
14-
git clone --branch v1.4.4 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
14+
git clone --branch v1.4.5 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
1515
cp ./../buildscript/master_deploy.sh .
1616
cp ./../buildscript/buildenv.sh .
1717
cp ./../buildscript/awsconfiguration.sh .

build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ perl -pi -e "s/\{\{AUTH0DOMAIN\}\}/$AUTH0DOMAIN/g" $CONFFILENAME
99

1010
SIGNUPFILENAME="./web-assets/js/signup.js"
1111
perl -pi -e "s/\{\{DOMAIN\}\}/$DOMAIN/g" $SIGNUPFILENAME
12+
perl -pi -e "s/\{\{AUTH0DOMAIN\}\}/$AUTH0DOMAIN/g" $SIGNUPFILENAME
1213

1314

1415
mkdir dist

web-assets/js/signup.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,14 @@ $(document).ready(function () {
4646
if (result.result.status === 200 && result.result.content.valid) {
4747
$("#error").closest(".message").fadeOut();
4848
$("#error").html("");
49-
$('#signup').attr('action', qs["formAction"]);
49+
let formAction = qs["formAction"];
50+
const opt1 = 'https://auth.{{DOMAIN}}/continue';
51+
const opt2 = 'https://{{AUTH0DOMAIN}}/continue';
52+
if (!formAction.startWith(opt1) && !formAction(opt2)) {
53+
// looks like XSS attack
54+
formAction = "#";
55+
}
56+
$('#signup').attr('action', formAction);
5057
$("#state").val(qs["state"]);
5158
$("#regSource").val(qs["regSource"]);
5259
$("#utmSource").val(qs["utmSource"]);

0 commit comments

Comments
 (0)