Skip to content

Commit 3e4b6da

Browse files
authored
Merge branch 'docs-v2-issue563' into claude/organize-shortcode-template-kVuEv
2 parents c822bd5 + 8f981ea commit 3e4b6da

File tree

18 files changed

+382
-212
lines changed

18 files changed

+382
-212
lines changed

.github/scripts/parse-pr-urls.js

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@ function isValidUrlPath(path) {
5151
// Reject path traversal attempts
5252
if (path.includes('..')) return false;
5353

54-
// Reject paths with suspicious characters (includes ' to prevent JS injection)
54+
// Reject paths with suspicious characters
55+
// Note: Backticks are in this list, but the extraction regex stops AT backticks,
56+
// so they act as delimiters rather than being included in paths
57+
// (includes ' to prevent JS injection)
5558
if (/[<>"|{}`\\^[\]']/.test(path)) return false;
5659

5760
// Reject URL-encoded characters (potential encoding attacks)
@@ -73,9 +76,13 @@ function isValidUrlPath(path) {
7376
function buildRelativePattern() {
7477
const namespaceAlternation = PRODUCT_NAMESPACES.join('|');
7578
// Match relative paths starting with known product prefixes
76-
// Also captures paths in markdown links: [text](/influxdb3/core/)
79+
// Captures paths in various contexts: markdown links, parentheses, backticks, etc.
80+
// Delimiters: start of string, whitespace, ], ), (, or `
81+
// Note: Backtick appears in both the delimiter list and negated character class
82+
// for defense-in-depth - delimiter stops extraction, character class prevents
83+
// any edge cases where backticks might slip through
7784
return new RegExp(
78-
`(?:^|\\s|\\]|\\)|\\()(\\/(?:${namespaceAlternation})[^\\s)\\]>"']*)`,
85+
`(?:^|\\s|\\]|\\)|\\(|\`)(\\/(?:${namespaceAlternation})[^\\s)\\]>"'\`]*)`,
7986
'gm'
8087
);
8188
}
@@ -130,14 +137,20 @@ export function extractDocsUrls(text) {
130137
/**
131138
* Normalize URL path to consistent format
132139
* @param {string} urlPath - URL path to normalize
133-
* @returns {string} - Normalized path with trailing slash
140+
* @returns {string} - Normalized path with trailing slash, wildcards stripped
134141
*/
135142
function normalizeUrlPath(urlPath) {
136143
// Remove anchor fragments
137144
let normalized = urlPath.split('#')[0];
138145
// Remove query strings
139146
normalized = normalized.split('?')[0];
140-
// Ensure trailing slash
147+
// Remove wildcard characters (* is often used to indicate "all pages")
148+
// Do this BEFORE collapsing slashes to handle patterns like /path/*/
149+
normalized = normalized.replace(/\*/g, '');
150+
// Collapse multiple consecutive slashes into single slash
151+
// This handles cases like /path/*/ → /path// → /path/
152+
normalized = normalized.replace(/\/+/g, '/');
153+
// Ensure trailing slash (important for Hugo's URL structure)
141154
if (!normalized.endsWith('/')) {
142155
normalized += '/';
143156
}

.github/scripts/test-parse-pr-urls.js

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,12 @@ test('Special characters: pipes and brackets', () => {
140140
assertEquals(result, [], 'Should reject paths with curly braces');
141141
});
142142

143-
test('Special characters: backticks', () => {
143+
test('Special characters: backticks are delimiters', () => {
144+
// Backticks act as delimiters, stopping URL extraction
145+
// This prevents command substitution injection
144146
const text = '/influxdb3/`whoami`/';
145147
const result = extractDocsUrls(text);
146-
assertEquals(result, [], 'Should reject paths with backticks');
148+
assertEquals(result, ['/influxdb3/'], 'Should truncate at backtick delimiter');
147149
});
148150

149151
test('Special characters: single quotes truncate at extraction', () => {
@@ -252,6 +254,36 @@ test('Normalization: removes query string', () => {
252254
assertEquals(result, ['/influxdb3/core/'], 'Should remove query string');
253255
});
254256

257+
test('Normalization: strips wildcard from path', () => {
258+
const text = '/influxdb3/enterprise/*';
259+
const result = extractDocsUrls(text);
260+
assertEquals(result, ['/influxdb3/enterprise/'], 'Should strip wildcard character');
261+
});
262+
263+
test('Normalization: strips wildcard in middle of path', () => {
264+
const text = '/influxdb3/*/admin/';
265+
const result = extractDocsUrls(text);
266+
assertEquals(result, ['/influxdb3/admin/'], 'Should strip wildcard from middle of path');
267+
});
268+
269+
test('Normalization: strips multiple wildcards', () => {
270+
const text = '/influxdb3/*/admin/*';
271+
const result = extractDocsUrls(text);
272+
assertEquals(result, ['/influxdb3/admin/'], 'Should strip all wildcard characters');
273+
});
274+
275+
test('Wildcard in markdown-style notation', () => {
276+
const text = '**InfluxDB 3 Enterprise pages** (`/influxdb3/enterprise/*`)';
277+
const result = extractDocsUrls(text);
278+
assertEquals(result, ['/influxdb3/enterprise/'], 'Should extract and normalize path with wildcard in backticks');
279+
});
280+
281+
test('Wildcard in parentheses', () => {
282+
const text = 'Affects pages under (/influxdb3/enterprise/*)';
283+
const result = extractDocsUrls(text);
284+
assertEquals(result, ['/influxdb3/enterprise/'], 'Should extract and normalize path with wildcard in parentheses');
285+
});
286+
255287
// Test deduplication
256288
test('Deduplication: same URL multiple times', () => {
257289
const text = `

content/enterprise_influxdb/v1/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ menu:
1010
weight: 1
1111
---
1212

13-
InfluxDB Enterprise provides a time series database designed to handle high write and query loads and offers highly scalable clusters on your infrastructure with a management UI. Use for DevOps monitoring, IoT sensor data, and real-time analytics. Check out the key features that make InfluxDB Enterprise a great choice for working with time series data.
13+
InfluxDB Enterprise provides a time series database designed to handle high write and query loads and offers highly scalable clusters on your infrastructure with a management UI. Use for DevOps monitoring, IoT sensor data, and real-time analytics.
1414

1515
{{< influxdb/cloud1-note >}}
1616

content/influxdb/cloud/sign-up.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Sign up for InfluxDB Cloud
33
description: >
4-
InfluxDB Cloud is a fully managed and hosted version of InfluxDB 2.0, the time series
4+
InfluxDB Cloud (TSM) is a fully managed and hosted version of InfluxDB 2.x, the time series
55
platform purpose-built to collect, store, process and visualize metrics and events.
66
menu:
77
influxdb_cloud:
@@ -12,7 +12,7 @@ aliases:
1212
- /influxdb/v2/cloud/get-started/
1313
---
1414

15-
InfluxDB Cloud is a fully managed and hosted version of InfluxDB, designed to collect, store, process, and visualize metrics and events.
15+
InfluxDB Cloud (TSM) is a fully managed and hosted version of InfluxDB 2.x, designed to collect, store, process, and visualize metrics and events.
1616

1717
> [!Note]
1818
> #### New InfluxDB Cloud signups use InfluxDB 3

content/influxdb/v1/about_the_project/release-notes.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: InfluxDB v1 release notes
3-
description: Important changes and and what's new in each version of InfluxDB OSS.
3+
description: Important features, fixes, and updates in each version of InfluxDB OSS v1.
44
menu:
55
influxdb_v1:
66
name: Release notes
@@ -76,7 +76,7 @@ of InfluxDB v1 workloads to InfluxDB 3.
7676
>
7777
> The last public release of InfluxDB v1 was v1.8.10. Upgrading from v1.8.10 to
7878
> v1.11.7 is a large jump and should be done with care. Consider doing
79-
> one or more of the the following before upgrading:
79+
> one or more of the following before upgrading:
8080
>
8181
> - [Back up your data](/influxdb/v1/administration/backup_and_restore/)
8282
> - Create a clone of your current InfluxDB using InfluxDB 1.11 with identical
@@ -98,7 +98,7 @@ of InfluxDB v1 workloads to InfluxDB 3.
9898
- Optimize `SHOW FIELD KEY CARDINALITY`.
9999
- `SHOW TAG VALUES` returns results from one specific retention policy.
100100
- Support `WITH KEY` clause in with `SHOW TAG KEYS`.
101-
- Support Hyper Log Log operators: `count_hll`, `sum_hll`, `merge_hll`.
101+
- Support Hyper Log operators: `count_hll`, `sum_hll`, `merge_hll`.
102102
- Use `count_hll` for `SHOW SERIES CARDINALITY` queries.
103103
- **Logging improvements:**
104104
- Log slow queries even without query logging enabled.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
2-
title: Learn about InfluxDB OSS
3-
description: Tasks to complete to get up and running with InfluxDB OSS.
2+
title: Learn about InfluxDB OSS 1.x
3+
description: Get up and running with InfluxDB OSS v{{< current-version >}}.
44
menu:
55
influxdb_v1:
66
name: Introduction
77
weight: 20
88
---
99

10-
To get up and running with the open source (OSS) version of InfluxDB, complete the following tasks:
10+
To get up and running with InfluxDB OSS v{{< current-version >}}, complete the following:
1111

1212
{{< children hlevel="h2" >}}
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Download InfluxDB OSS
2+
title: Download InfluxDB OSS v1
33
menu:
44
influxdb_v1:
55
name: Download InfluxDB
@@ -9,9 +9,10 @@ aliases:
99
- /influxdb/v1/introduction/downloading/
1010
---
1111

12-
Download the latest InfluxDB open source (OSS) release at the [InfluxData download page](https://www.influxdata.com/downloads/).
12+
Download the latest InfluxDB open source (OSS) release at the [InfluxData Downloads page](https://www.influxdata.com/downloads/).
1313

14-
1. Scroll to the bottom of the [`downloads page`](https://www.influxdata.com/downloads/) and click **Are you interested in InfluxDB 1.x Open Source?** to expand the 1.x options.
15-
2. Under **Are you interested in InfluxDB 1.x Open Source?**, select the version of InfluxDB you want to download.
16-
3. Under the **Platform** dropdown menu, select your operating system.
17-
4. Execute the provided download commands.
14+
1. Scroll to the bottom of the [downloads page](https://www.influxdata.com/downloads/) and click **2** to navigate to the second page of products.
15+
2. Under **InfluxDB OSS 1.x**, select:
16+
- your **Platform** (operating system) and
17+
- the **Version** of InfluxDB you want to download.
18+
3. Run the provided commands to download and install InfluxDB.

content/influxdb/v1/introduction/get-started/_index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: Get started with InfluxDB OSS
3-
description: Get started with InfluxDB OSS. Learn how to create databases, write data, and query your time series data.
2+
title: Get started with InfluxDB OSS v1
3+
description: Get started with InfluxDB OSS v{{< current-version >}}. Learn how to create databases, write data, and query your time series data.
44
aliases:
55
- /influxdb/v1/introduction/getting_started/
66
- /influxdb/v1/introduction/getting-started/
@@ -13,7 +13,7 @@ alt_links:
1313
v2: /influxdb/v2/get-started/
1414
---
1515

16-
With InfluxDB open source (OSS) [installed](/influxdb/v1/introduction/installation), you're ready to start working with time series data.
16+
With InfluxDB [installed](/influxdb/v1/introduction/installation), you're ready to start working with time series data.
1717
This guide uses the `influx` [command line interface](/influxdb/v1/tools/shell/) (CLI), which is included with InfluxDB
1818
and provides direct access to the database.
1919
The CLI communicates with InfluxDB through the HTTP API on port `8086`.

content/influxdb/v1/introduction/install.md

Lines changed: 54 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: Install InfluxDB OSS
3-
description: Install, start, and configure InfluxDB OSS.
2+
title: Install InfluxDB OSS v1
3+
description: Install, start, and configure InfluxDB OSS v{{< current-version >}}.
44
menu:
55
influxdb_v1:
66
name: Install InfluxDB
@@ -12,7 +12,7 @@ alt_links:
1212
v2: /influxdb/v2/install/
1313
---
1414

15-
This page provides directions for installing, starting, and configuring InfluxDB open source (OSS).
15+
Install, start, and configure InfluxDB open source (OSS) v{{< current-version >}}.
1616

1717
## InfluxDB OSS installation requirements
1818

@@ -144,7 +144,7 @@ sudo systemctl start influxdb
144144

145145
{{% tab-content %}}
146146

147-
There are RPM packages provided by openSUSE Build Service for SUSE Linux users:
147+
For SUSE Linux users, openSUSE Build Service provides RPM packages:
148148

149149
```bash
150150
# add go repository
@@ -280,24 +280,61 @@ internal defaults.
280280
Note that the local configuration file does not need to include every
281281
configuration setting.
282282
283-
There are two ways to launch InfluxDB with your configuration file:
283+
Use one of the following methods to launch InfluxDB OSS v1 with your configuration file:
284284
285-
* Point the process to the correct configuration file by using the `-config`
286-
option:
285+
- **CLI flag**: Pass the `-config` flag with the path to your configuration file:
287286
288287
```bash
289288
influxd -config /etc/influxdb/influxdb.conf
290289
```
291-
* Set the environment variable `INFLUXDB_CONFIG_PATH` to the path of your
292-
configuration file and start the process.
293-
For example:
290+
- **Environment variable**: Set the `INFLUXDB_CONFIG_PATH` environment variable to the path of your
291+
configuration file and start the process--for example:
294292
295-
```
296-
echo $INFLUXDB_CONFIG_PATH
297-
/etc/influxdb/influxdb.conf
293+
{{< code-tabs-wrapper >}}
294+
{{% code-tabs %}}
295+
[Linux/macOS (bash/zsh)](#)
296+
[Linux/macOS (persistent)](#)
297+
[Windows (PowerShell)](#)
298+
[Windows (CMD)](#)
299+
{{% /code-tabs %}}
300+
{{% code-tab-content %}}
301+
```bash
302+
# Set the environment variable for the current session
303+
export INFLUXDB_CONFIG_PATH=/etc/influxdb/influxdb.conf
298304
299-
influxd
300-
```
305+
# Start InfluxDB
306+
influxd
307+
```
308+
{{% /code-tab-content %}}
309+
{{% code-tab-content %}}
310+
```bash
311+
# Add to ~/.bashrc or ~/.zshrc for persistence
312+
echo 'export INFLUXDB_CONFIG_PATH=/etc/influxdb/influxdb.conf' >> ~/.bashrc
313+
source ~/.bashrc
314+
315+
# Start InfluxDB
316+
influxd
317+
```
318+
{{% /code-tab-content %}}
319+
{{% code-tab-content %}}
320+
```powershell
321+
# Set the environment variable for the current session
322+
$env:INFLUXDB_CONFIG_PATH = "C:\Program Files\InfluxDB\influxdb.conf"
323+
324+
# Start InfluxDB
325+
influxd
326+
```
327+
{{% /code-tab-content %}}
328+
{{% code-tab-content %}}
329+
```cmd
330+
REM Set the environment variable for the current session
331+
set INFLUXDB_CONFIG_PATH=C:\Program Files\InfluxDB\influxdb.conf
332+
333+
REM Start InfluxDB
334+
influxd
335+
```
336+
{{% /code-tab-content %}}
337+
{{< /code-tabs-wrapper >}}
301338

302339
InfluxDB first checks for the `-config` option and then for the environment
303340
variable.
@@ -314,9 +351,8 @@ See the [Configuration](/influxdb/v1/administration/config/) documentation for m
314351

315352
Make sure the directories in which data and the [write ahead log](/influxdb/v1/concepts/glossary#wal-write-ahead-log) (WAL) are stored are writable for the user running the `influxd` service.
316353

317-
{{% note %}}
318-
**Note:** If the data and WAL directories are not writable, the `influxd` service will not start.
319-
{{% /note %}}
354+
> [!Important]
355+
> If the data and WAL directories are not writable, the `influxd` service will not start.
320356
321357
The user running the `influxd` process should have the following permissions for
322358
directories in the [InfluxDB file system](/influxdb/v1//concepts/file-system-layout/):

content/influxdb/v1/introduction/install/docker.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Install and run InfluxDB using Docker
33
description: >
4-
Install and run InfluxDB OSS v1.x using Docker. Configure and operate InfluxDB in a Docker container.
4+
Install and run InfluxDB OSS v{{< current-version >}} using Docker. Configure and operate InfluxDB in a Docker container.
55
menu:
66
influxdb_v1:
77
name: Use Docker
@@ -20,7 +20,7 @@ alt_links:
2020
v2: /influxdb/v2/install/use-docker-compose/
2121
---
2222

23-
Install and run InfluxDB OSS v1.x using Docker containers.
23+
Install and run InfluxDB OSS v{{< current-version >}} using Docker containers.
2424
This guide covers Docker installation, configuration, and initialization options.
2525

2626
- [Install and run InfluxDB](#install-and-run-influxdb)

0 commit comments

Comments
 (0)