mitchell852 opened a new issue #4298: Line breaks in DS raw remap text will 
result in a malformed remap.config file 
URL: https://github.com/apache/trafficcontrol/issues/4298
 
 
   ## I'm submitting a ...
   <!-- (check all that apply with "[x]") -->
   <!--- security vulnerability (STOP!! - see above)-->
   - [x] bug report
   - [ ] new feature / enhancement request
   - [ ] improvement request (usability, performance, tech debt, etc.)
   - [ ] other <!--(Please do not submit support requests here - see above)-->
   
   ## Traffic Control components affected ...
   <!-- (check all that apply with "[x]") -->
   - [ ] CDN in a Box
   - [ ] Documentation
   - [ ] Grove
   - [ ] Traffic Control Client
   - [ ] Traffic Monitor
   - [x] Traffic Ops
   - [ ] Traffic Ops ORT
   - [x] Traffic Portal
   - [ ] Traffic Router
   - [ ] Traffic Stats
   - [ ] Traffic Vault
   - [ ] unknown
   
   ## Current behavior:
   When creating or editing a delivery service of type HTTP*, DNS* or ANY_MAP, 
a line break in the `remapText` field will result in a malformed remap.config 
file being deployed to all of the edge caches assigned to the delivery service 
which can have a negative impact across multiple delivery services (if multiple 
delivery services are assigned to the cache).
   
   When remapText = foo[line break]bar, the applicable line in remap.config 
will look like this:
   
   ```
   map  http://edge.demo1.mycdn.ciab.test/     http://origin.infra.ciab.test/  
foo
   bar
   map  http://edge.demo2.mycdn.ciab.test/     http://origin2.infra.ciab.test/
   ```
   
   ## Expected / new behavior:
   On API DS create/update, any line breaks in the `remapText` field need to be 
removed.
   
   ## Minimal reproduction of the problem with instructions:
   1. In TP, create or edit an HTTP*, DNS* or ANY_MAP delivery service and 
enter a line break in the `Raw Remap Text` field.
   2. Navigate to the assigned servers for DS. Pick one.
   3. View config files for the server.
   4. View the contents of remap.config file and notice the line that doesn't 
start with `map`
   
   <!--
   Licensed to the Apache Software Foundation (ASF) under one
   or more contributor license agreements.  See the NOTICE file
   distributed with this work for additional information
   regarding copyright ownership.  The ASF licenses this file
   to you under the Apache License, Version 2.0 (the
   "License"); you may not use this file except in compliance
   with the License.  You may obtain a copy of the License at
   
       http://www.apache.org/licenses/LICENSE-2.0
   
   Unless required by applicable law or agreed to in writing,
   software distributed under the License is distributed on an
   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
   KIND, either express or implied.  See the License for the
   specific language governing permissions and limitations
   under the License.
   -->

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to