mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
DEV: Prefer \A and \z over ^ and $ in regexes (#19936)
This commit is contained in:

committed by
GitHub

parent
f7907a3645
commit
666536cbd1
@ -47,7 +47,7 @@ class ThemeJavascriptsController < ApplicationController
|
||||
|
||||
def show_tests
|
||||
digest = params[:digest]
|
||||
raise Discourse::NotFound if !digest.match?(/^\h{40}$/)
|
||||
raise Discourse::NotFound if !digest.match?(/\A\h{40}\z/)
|
||||
|
||||
theme = Theme.find_by(id: params[:theme_id])
|
||||
raise Discourse::NotFound if theme.blank?
|
||||
|
Reference in New Issue
Block a user