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

Unescapes feature_name in FeatureNameFromRoute #377

Merged
merged 1 commit into from
Sep 30, 2018

Conversation

AlexWheeler
Copy link
Collaborator

@AlexWheeler AlexWheeler commented Sep 28, 2018

  • Before we supported slashes we unescaped the feature name, but the
    change to get feature_name using FeatureNameFromRoute is not
    unescaping feature names.

This causes 2 issues:

  1. The redirect when creating the feature displays the feature name unescaped
  2. When you go to enable a gate for the feature the feature_key is the unescaped value

Reproduce:

  • Flipper, Flipper UI, Flipper ActiveRecord - (all 0.16.0)
  • Rails 4.2.4
  • browsers: ChromeVersion 69.0.3497.100 and SafariVersion 11.1
  1. Navigate to features/new and create my_team:cool_feature. This will redirect you to feature page:

create-feature-redirect

  1. Confirm database feature record looks correct

feature-key

  1. Enable the boolean gate for this feature by clicking "Enable"

  2. Confirm it is enabled for the wrong feature_key

gate-feature-key

Note: All is good if you link to the feature from the /features view

* Before we supported slashes we unescaped the feature name, but teh
change to pull feature_name using  FeatureNameFromRoute is not
unescaping feature names.  This is an issue because when you create a
new feature it redirects to the feature show page.  Then when you go to
enable a gate the feature_key the gate gets is not unescaped so the
feature is not enabled.
Copy link
Collaborator

@jnunemaker jnunemaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool. Happy to get this out. Curious if there is any regression test that could be added, but not a blocker for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants