Mercurial > kallithea
comparison rhodecode/lib/utils.py @ 2668:f0851f37d6be beta
Implementes #509 require SSL flag now works for both git and mercurial.
- check is done at earlies possible stage
- if detected protocol is not https and flag require is there RhodeCode will
return HTTP Error 406: Not Acceptable, before even checking credentials
- removed push_ssl flag from mercurial UI objects since that would duplicate logic
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Thu, 26 Jul 2012 23:03:26 +0200 |
parents | d6fa7805e687 |
children | 2b6939a77052 |
comparison
equal
deleted
inserted
replaced
2667:129beb0062c2 | 2668:f0851f37d6be |
---|---|
310 .options(FromCache("sql_cache_short", "get_hg_ui_settings"))\ | 310 .options(FromCache("sql_cache_short", "get_hg_ui_settings"))\ |
311 .all() | 311 .all() |
312 | 312 |
313 hg_ui = ret | 313 hg_ui = ret |
314 for ui_ in hg_ui: | 314 for ui_ in hg_ui: |
315 if ui_.ui_active: | 315 if ui_.ui_active and ui_.ui_key != 'push_ssl': |
316 log.debug('settings ui from db[%s]%s:%s', ui_.ui_section, | 316 log.debug('settings ui from db[%s]%s:%s', ui_.ui_section, |
317 ui_.ui_key, ui_.ui_value) | 317 ui_.ui_key, ui_.ui_value) |
318 baseui.setconfig(ui_.ui_section, ui_.ui_key, ui_.ui_value) | 318 baseui.setconfig(ui_.ui_section, ui_.ui_key, ui_.ui_value) |
319 | 319 |
320 meta.Session.remove() | 320 meta.Session.remove() |