Overview
Comment: | Remove PREFER_HTTPS configuration constant |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | dev |
Files: | files | file ages | folders |
SHA3-256: |
74fbf7796e9054380add91fbc01416df |
User & Date: | bohwaz on 2021-11-11 22:30:17 |
Other Links: | branch diff | manifest | tags |
Context
2021-11-30
| ||
19:28 | Merge trunk changes check-in: ae98ad0863 user: bohwaz tags: dev | |
2021-11-11
| ||
22:30 | Remove PREFER_HTTPS configuration constant check-in: 74fbf7796e user: bohwaz tags: dev | |
2021-10-28
| ||
03:05 | Rename Membres\Session class to Users\Session, and adapt to new DB schema check-in: 6c4430703c user: bohwaz tags: dev | |
Changes
Modified src/config.dist.php from [731c136e13] to [5633367746].
︙ | ︙ | |||
54 55 56 57 58 59 60 | * la recopiant à la place du fichier association.sqlite * * Défaut : true */ //const ALLOW_MODIFIED_IMPORT = true; | < < < < < < < < < < < < < < | 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | * la recopiant à la place du fichier association.sqlite * * Défaut : true */ //const ALLOW_MODIFIED_IMPORT = true; /** * Répertoire où se situe le code source de Garradin * * Défaut : répertoire racine de Garradin (__DIR__) */ //const ROOT = __DIR__; |
︙ | ︙ |
Modified src/include/init.php from [22b419591e] to [7fc7d466ee].
︙ | ︙ | |||
148 149 150 151 152 153 154 | static $default_config = [ 'CACHE_ROOT' => DATA_ROOT . '/cache', 'SHARED_CACHE_ROOT' => DATA_ROOT . '/cache/shared', 'DB_FILE' => DATA_ROOT . '/association.sqlite', 'DB_SCHEMA' => ROOT . '/include/data/schema.sql', 'PLUGINS_ROOT' => DATA_ROOT . '/plugins', | < | 148 149 150 151 152 153 154 155 156 157 158 159 160 161 | static $default_config = [ 'CACHE_ROOT' => DATA_ROOT . '/cache', 'SHARED_CACHE_ROOT' => DATA_ROOT . '/cache/shared', 'DB_FILE' => DATA_ROOT . '/association.sqlite', 'DB_SCHEMA' => ROOT . '/include/data/schema.sql', 'PLUGINS_ROOT' => DATA_ROOT . '/plugins', 'ALLOW_MODIFIED_IMPORT' => true, 'PLUGINS_SYSTEM' => '', 'SHOW_ERRORS' => true, 'MAIL_ERRORS' => false, 'ERRORS_REPORT_URL' => null, 'ENABLE_TECH_DETAILS' => true, 'USE_CRON' => false, |
︙ | ︙ |
Modified src/include/lib/Garradin/Users/Session.php from [5d9cfeeacc] to [6f3cb7b211].
︙ | ︙ | |||
59 60 61 62 63 64 65 | } $url = parse_url(ADMIN_URL); parent::__construct(DB::getInstance(), [ 'cookie_domain' => $url['host'], 'cookie_path' => preg_replace('!/admin/$!', '/', $url['path']), | | | 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | } $url = parse_url(ADMIN_URL); parent::__construct(DB::getInstance(), [ 'cookie_domain' => $url['host'], 'cookie_path' => preg_replace('!/admin/$!', '/', $url['path']), 'cookie_secure' => HTTP::getScheme() == 'https' ? true : false, ]); } static public function checkPasswordValidity($password) { if (strlen($password) < self::MINIMUM_PASSWORD_LENGTH) { |
︙ | ︙ |
Modified src/templates/admin/login.tpl from [f3e8752670] to [52da43c89e].
1 2 3 4 5 6 7 8 9 10 11 | {include file="admin/_head.tpl" title="Connexion"} {form_errors} {if $changed} <p class="block confirm"> Votre mot de passe a bien été modifié.<br /> Vous pouvez maintenant l'utiliser pour vous reconnecter. </p> {/if} | < < < < < < < < < < < < | < | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | {include file="admin/_head.tpl" title="Connexion"} {form_errors} {if $changed} <p class="block confirm"> Votre mot de passe a bien été modifié.<br /> Vous pouvez maintenant l'utiliser pour vous reconnecter. </p> {/if} <p class="block error" style="display: none;" id="old_browser"> Le navigateur que vous utilisez n'est pas supporté. Des fonctionnalités peuvent ne pas fonctionner.<br /> Merci d'utiliser un navigateur web moderne comme <a href="https://www.getfirefox.com/" target="_blank">Firefox</a> ou <a href="https://vivaldi.com/fr/" target="_blank">Vivaldi</a>. </p> <form method="post" action="{$self_url}"> <fieldset> <legend>Connexion</legend> <dl> <dt><label for="f_id">{$id_field_name}</label></dt> <dd><input type="text" name="_id" id="f_id" value="{form_field name=_id}" /></dd> <dt><label for="f_passe">Mot de passe</label></dt> <dd><input type="password" name="password" id="f_passe" value="" autocomplete="current-password" /> {if $ssl_enabled} <b class="icn confirm" title="Connexion chiffrée">🔒</b> <span class="confirm">Connexion sécurisée</span> {else} <b class="icn error" title="Connexion non chiffrée">🔓</b> <span class="alert">Connexion non-sécurisée</span> {/if} </dd> {input type="checkbox" name="permanent" value="1" label="Rester connecté⋅e" help="recommandé seulement sur ordinateur personnel"} </dl> </fieldset> <p class="submit"> |
︙ | ︙ |
Modified src/www/admin/_inc.php from [3d26a77b35] to [499ff826c1].
1 2 3 4 5 6 7 8 | <?php namespace Garradin; use Garradin\Users\Session; require_once __DIR__ . '/../../include/init.php'; | < < < < < < < | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | <?php namespace Garradin; use Garradin\Users\Session; require_once __DIR__ . '/../../include/init.php'; function f($key) { return \KD2\Form::get($key); } // Query-Validate: valider les éléments passés en GET function qv(Array $rules) |
︙ | ︙ |
Modified src/www/admin/login.php from [052d532ffd] to [8c4716aaec].
1 2 3 4 5 6 7 8 9 | <?php namespace Garradin; const LOGIN_PROCESS = true; require_once __DIR__ . '/_inc.php'; // Relance session_start et renvoie une image de 1px transparente if (qg('keepSessionAlive') !== null) | > > | 1 2 3 4 5 6 7 8 9 10 11 | <?php namespace Garradin; use KD2\HTTP; const LOGIN_PROCESS = true; require_once __DIR__ . '/_inc.php'; // Relance session_start et renvoie une image de 1px transparente if (qg('keepSessionAlive') !== null) |
︙ | ︙ | |||
39 40 41 42 43 44 45 | } if (!$session->login(f('_id'), f('password'), (bool) f('permanent'))) { throw new UserException(sprintf("Connexion impossible.\nVérifiez votre identifiant (%s) et votre mot de passe.", $id_field_name)); } }, 'login', ADMIN_URL); | | < < | 41 42 43 44 45 46 47 48 49 50 51 52 53 | } if (!$session->login(f('_id'), f('password'), (bool) f('permanent'))) { throw new UserException(sprintf("Connexion impossible.\nVérifiez votre identifiant (%s) et votre mot de passe.", $id_field_name)); } }, 'login', ADMIN_URL); $tpl->assign('ssl_enabled', HTTP::getScheme() == 'https' ? false : true); $tpl->assign(compact('id_field_name')); $tpl->assign('changed', qg('changed') !== null); $tpl->display('admin/login.tpl'); |