diff options
| author | 2025-11-11 08:17:12 +0100 | |
|---|---|---|
| committer | 2025-11-11 08:17:12 +0100 | |
| commit | a18c35046daee15e7ac5f85db290d54541a03e3c (patch) | |
| tree | ec638cf7c93537a4f81b27216097d8509252eb81 /app/install.php | |
| parent | 5e622c60fa5c40793138807280319f7e84d00cc6 (diff) | |
Housekeeping lib_rss.php (#8193)
* Housekeeping lib_rss.php
`lib_rss.php` had become much too large, especially after https://github.com/FreshRSS/FreshRSS/pull/7924
Moved most functions to other places.
Mostly no change of code otherwise (see comments).
* Extension: composer run-script phpstan-third-party
Diffstat (limited to 'app/install.php')
| -rw-r--r-- | app/install.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/app/install.php b/app/install.php index f7b15d468..ae898d814 100644 --- a/app/install.php +++ b/app/install.php @@ -224,12 +224,12 @@ function saveStep3(): bool { } if (FreshRSS_Context::systemConf()->auth_type === 'http_auth' && - connectionRemoteAddress() !== '' && + Minz_Request::connectionRemoteAddress() !== '' && empty($_SERVER['REMOTE_USER']) && empty($_SERVER['REDIRECT_REMOTE_USER']) && // No safe authentication HTTP headers (!empty($_SERVER['HTTP_REMOTE_USER']) || !empty($_SERVER['HTTP_X_WEBAUTH_USER'])) // but has unsafe authentication HTTP headers ) { // Trust by default the remote IP address (e.g. last proxy) used during install to provide remote user name via unsafe HTTP header - FreshRSS_Context::systemConf()->trusted_sources[] = connectionRemoteAddress(); + FreshRSS_Context::systemConf()->trusted_sources[] = Minz_Request::connectionRemoteAddress(); FreshRSS_Context::systemConf()->trusted_sources = array_unique(FreshRSS_Context::systemConf()->trusted_sources); } @@ -661,7 +661,7 @@ function printStep3(): void { <div class="group-controls"> <input type="text" id="default_user" name="default_user" autocomplete="username" required="required" size="16" pattern="<?= FreshRSS_user_Controller::USERNAME_PATTERN ?>" value="<?= $default_user ?>" - placeholder="<?= httpAuthUser(false) == '' ? 'alice' : httpAuthUser(false) ?>" tabindex="1" /> + placeholder="<?= FreshRSS_http_Util::httpAuthUser(false) == '' ? 'alice' : FreshRSS_http_Util::httpAuthUser(false) ?>" tabindex="1" /> <p class="help"><?= _i('help') ?> <?= _t('install.default_user.max_char') ?></p> </div> </div> @@ -670,12 +670,12 @@ function printStep3(): void { <label class="group-name" for="auth_type"><?= _t('admin.auth.type') ?></label> <div class="group-controls"> <select id="auth_type" name="auth_type" required="required" tabindex="2"> - <option value="form"<?= $auth_type === 'form' || (no_auth($auth_type) && cryptAvailable()) ? ' selected="selected"' : '', - cryptAvailable() ? '' : ' disabled="disabled"' ?>><?= _t('admin.auth.form') ?></option> + <option value="form"<?= $auth_type === 'form' || (no_auth($auth_type) && FreshRSS_password_Util::cryptAvailable()) ? ' selected="selected"' : '', + FreshRSS_password_Util::cryptAvailable() ? '' : ' disabled="disabled"' ?>><?= _t('admin.auth.form') ?></option> <option value="http_auth"<?= $auth_type === 'http_auth' ? ' selected="selected"' : '', - httpAuthUser(false) == '' ? ' disabled="disabled"' : '' ?>> - <?= _t('admin.auth.http') ?> (REMOTE_USER = '<?= httpAuthUser(false) ?>')</option> - <option value="none"<?= $auth_type === 'none' || (no_auth($auth_type) && !cryptAvailable()) ? ' selected="selected"' : '' + FreshRSS_http_Util::httpAuthUser(false) == '' ? ' disabled="disabled"' : '' ?>> + <?= _t('admin.auth.http') ?> (REMOTE_USER = '<?= FreshRSS_http_Util::httpAuthUser(false) ?>')</option> + <option value="none"<?= $auth_type === 'none' || (no_auth($auth_type) && !FreshRSS_password_Util::cryptAvailable()) ? ' selected="selected"' : '' ?>><?= _t('admin.auth.none') ?></option> </select> </div> |
