Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double quotes in password not being escaped #83

Open
iammerus opened this issue Aug 4, 2019 · 0 comments
Open

Double quotes in password not being escaped #83

iammerus opened this issue Aug 4, 2019 · 0 comments

Comments

@iammerus
Copy link

iammerus commented Aug 4, 2019

IMPORTANT: This is a bug report. If you are having problem with deploying a particular app use the deployment issue type.

If you are having problems with deploying a particular app using a customized dockerfile - please change your questions to Dockerfile and post it where appropriate such as StackOverflow. This is a Docker question, not a CapRover specific issue.


What is the problem?

When setting the default MySQL password, using double quotes in the password will cause the deployment process to fail and throw an error (Not being escaped perhaps? See below)

Cannot parse: {"captainVersion":"1","documentation":"Taken from https://docs.docker.com/compose/mysql/ port mapping removed from WP as it's not needed","dockerCompose":{"version":"3.3","services":{"test-db":{"image":"mysql:5.7","notExposeAsWebApp":"true","volumes":["test-db-data:/var/lib/mysql"],"restart":"always","environment":{"MYSQL_ROOT_PASSWORD":"password123""}}}},"instructions":{"start":"MySQL is the world's most popular open source database. With its proven performance, reliability and ease-of-use, MySQL has become the leading database choice for web-based applications, covering the entire range from personal projects and websites, via e-commerce and information services, all the way to high profile web properties including Facebook, Twitter, YouTube, Yahoo! and many more.\n\n After installation on CapRover, it will be available as srv-captain--YOUR_CONTAINER_NAME at port 3306 to other CapRover apps.\n\nEnter your MySQL Configuration parameters and click on next. It will take about a minute for the process to finish.","end":"'MySQL is deployed and available as srv-captain--test-db:3306 to other apps. For example with NodeJS, you do 'var con = mysql.createConnection({ host: 'srv-captain--test-db', user: 'root', password: '*********' });'"},"variables":[{"id":"test","label":"App Name","description":"This is your app name. Pick a name such as my-first-1-click-app","validRegex":"/^([a-z0-9]+\\-)*[a-z0-9]+$/"},{"id":"5.7","label":"MySQL Version","defaultValue":"5.7","description":"Checkout their docker page for the valid tags https://hub.docker.com/r/library/mysql/tags/","validRegex":"/^([^\\s^\\/])+$/"},{"id":"password123"","label":"MySQL Root password","description":"","validRegex":"/.{1,}/"}]} SyntaxError: Unexpected string in JSON at position 352

If applicable, content of captain-definition file:

N / A

Steps to reproduce the problem:

  1. Create a new one click app
  2. Select MySQL
  3. Set the password to anything that has double quotes in it ex. password123"
  4. See error

Answers to the following questions where applicable:

  • Ubuntu 18.04 LTS
  • 1GB RAM
@githubsaturn githubsaturn transferred this issue from caprover/caprover Aug 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant