core icon indicating copy to clipboard operation
core copied to clipboard

Static Push: Unable to push content in a bucket with _ in its bucket name

Open nollymar opened this issue 9 years ago • 7 comments

Considering that the suggested bucket name pattern is: dotcms-bucket-{hostname}-{languageIso} and the application allows to create a site with * as part of the name, the user should be able to push content in a bucket whose name contains *.

Trace log: https://gist.github.com/nollymar/d80ee14c499917cb93b851770a20da05

Important note: Creating a bucket with _ in its name is not possible in AWS Console either. However, site name and bucket name restrictions should be aligned, considering the suggested bucket name pattern.

Current Behavior

Unable to push static content in a bucket whose name contains _

Steps to Reproduce (for bugs)

  1. Create a site with _ in its name
  2. Configure a static push environment using the suggested bucket name pattern
  3. Try to push the site

Your Environment

  • dotCMS version used: 3.7.0
  • Browser Name and version: Google Chrome
  • Operating System and version: Mac OS
  • Application Server and version: Tomcat 8
  • Java Brand and version: JDK 1.8
  • Database and version: Postgres (starter)
  • Application module (if apply): Push Publishing

nollymar avatar Jan 27 '17 21:01 nollymar

We need to consider also blank spaces (i.e.: copy of demo) and probably other special characters. Some clients' site names may contain blank spaces and could be in trouble doing a static push of their site. I tested this scenario using started data and client data after an upgrade and got this error: https://gist.github.com/shaydotcms/fd9658771b8a1a67f3ce4d69bd7e7b16

shaydotcms avatar Jan 30 '17 16:01 shaydotcms

These are the special characters that can be used in the host name but are not allowed by AWS in the bucket name: .. , ! : ; & ? $ * / \ [ ] = | # _ " " @ ( ) < > + Note: this character "-" can be used between word in AWS (i.e.: "test-bucket") but not at the end of the word (i.e.: "testbucket-")

shaydotcms avatar Jan 30 '17 17:01 shaydotcms

FYI: We need take in consideration these rules... http://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html

bryanboza avatar Jan 30 '17 18:01 bryanboza

But i think that are the same rules that you should use to name a DNS https://en.wikipedia.org/wiki/Domain_Name_System#Domain_name_syntax

bryanboza avatar Jan 30 '17 18:01 bryanboza

ee PR: https://github.com/dotCMS/enterprise-2.x/pull/434 core PR: https://github.com/dotCMS/core/pull/10578

oarrietadotcms avatar Jan 30 '17 20:01 oarrietadotcms

It fails in a specific case. View https://github.com/dotCMS/core/issues/10588

nollymar avatar Jan 31 '17 15:01 nollymar

http://auth.dotcms.com/docs/latest/connecting-remote-servers

DeanGonzalez avatar Feb 03 '17 16:02 DeanGonzalez