Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

[Bug] Retention policy functionality doesn't escape/backtick policy name or database preventing legitimate characters #320

@andyfeller

Description

@andyfeller

The following retention policy commands in influxdb-python/influxdb/client.py do not escape/backtick database and/or retention policy name thus breaking when allowed characters are used elsewhere (e.g. database names containing hyphens like "db_0474102f-8397-481d-bcba-06f3a682854d").

Note: This might extend to more than simply retention policy commands but will allow maintainers to determine scope as it should be universally done.

  1. create_retention_policy

    
       query_string = \
            "CREATE RETENTION POLICY %s ON %s " \
            "DURATION %s REPLICATION %s" % \
    
    
  2. alter_retention_policy

    
        query_string = (
            "ALTER RETENTION POLICY {0} ON {1}"
    
    
  3. drop_retention_policy

    
        query_string = (
            "DROP RETENTION POLICY {0} ON {1}"
    
    
  4. get_list_retention_policies

    
        rsp = self.query(
            "SHOW RETENTION POLICIES ON %s" % (database or self._database)
    
    

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy