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

🐛 Fixed issue where single letter product slugs cause 500 error #16821

Merged

Conversation

mike182uk
Copy link
Member

refs https://github.com/TryGhost/Team/issues/3224

When a product has a slug that is a single letter, checking if a user had access to view a post associated with that product would cause a 500 error. The underlying cause of this issue is TryGhost/NQL#20 This fix circumvents this issue by providing a value that the nql lexer will not error out on

refs TryGhost/Product#3224

When a product has a slug that is a single letter, checking if a user had
access to view a post associated with that product would cause a 500 error.
The underlying cause of this issue is TryGhost/NQL#20
This fix circumvents this issue by providing a value that the nql lexer
will not error out on
Copy link
Contributor

@naz naz left a comment

Choose a reason for hiding this comment

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

:shipit: let's get it into main. nice find Mike!

@codecov
Copy link

codecov bot commented May 18, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (cfbcd6f) 72.26% compared to head (fdda4fa) 72.26%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #16821   +/-   ##
=======================================
  Coverage   72.26%   72.26%           
=======================================
  Files        1797     1797           
  Lines      113816   113816           
  Branches    17022    17022           
=======================================
+ Hits        82251    82252    +1     
+ Misses      30459    30458    -1     
  Partials     1106     1106           
Flag Coverage Δ
e2e-tests 84.74% <100.00%> (-0.01%) ⬇️
unit-tests 56.20% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ore/core/server/services/members/content-gating.js 100.00% <100.00%> (ø)

... and 14 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@mike182uk mike182uk merged commit cde30eb into TryGhost:main May 18, 2023
@mike182uk mike182uk deleted the fix-members-api-product-nql-query branch May 18, 2023 08:46
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