tweens: check url sanity before vcs detection tween.

This commit is contained in:
Marcin Kuzminski 2019-03-05 22:24:05 +01:00
parent ba0940ba94
commit a1b36af5a6

View file

@ -92,6 +92,7 @@ def junk_form_data_detector(request):
def sanity_check_factory(handler, registry):
def sanity_check(request):
log.debug('Checking URL sanity')
try:
junk_encoding_detector(request)
bad_url_data_detector(request)
@ -113,5 +114,5 @@ def includeme(config):
'pyramid.events.NewRequest')
config.add_subscriber('rhodecode.subscribers.add_request_user_context',
'pyramid.events.ContextFound')
config.add_tween('rhodecode.tweens.sanity_check_factory')
config.add_tween('rhodecode.tweens.vcs_detection_tween_factory')
config.add_tween('rhodecode.tweens.sanity_check_factory')