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

Fix OpenStack.escape with dash/extra characters #526

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Aug 17, 2022

  1. Fix OpenStack.escape with dash/extra characters

    There is a bug in the regexp used in `OpenStack.escape` in that when
    `extra_exclude_chars` is set, dash is no longer the last character in
    the pattern.
    
    This causes the regexp to treat it as a range, not a character of its
    own and that causes it to be escaped.
    
        # Before
        Fog::OpenStack.escape("test-pattern/", "/") # => "test%2Dpattern/"
        Fog::OpenStack.escape("test-pattern/") # => "test-pattern%2F"
        # After
        Fog::OpenStack.escape("test-pattern/", "/") # => "test-pattern/"
    
    It does not happen when `extra_exclude_chars` is blank.
    
    We spotted this in our Brightbox provider which was forked from the
    OpenStack implementation. It appears to have been fixed in Rackspace for
    a few years and copied into Google provider.
    tokengeek committed Aug 17, 2022
    Configuration menu
    Copy the full SHA
    51e6db9 View commit details
    Browse the repository at this point in the history