Журнал изменений

Журнал изменений

Фильтр и поиск

Всего: 1136 Доступных коммитов | Отфильтровано: 1136 Коммиты | Страница: 96 / 114
16.02.2026
Refactor: Move SEO settings from static config to admin-managed $conf
Автор: Eduard Laas | Дата: 15:20 16.02.2026

SEO-related settings (rewrite, sep, tsep, title, ctitle, ltitle, keys, akeys, dkeys, etc.) are migrated from config_seo.php into the global $conf array, making them editable via the admin panel.

Core changes:

  1. Admin config UI (admin/modules/config.php):
  2. Add input fields for title separator (tsep) and SEO title toggles
  3. Change default URL separator from '|' to '-'
  4. Save new fields (tsep, title, ctitle) to database
  5. SEO config cleanup (config/config_seo.php):
  6. Comment out all settings now managed via $conf
  7. Retain file structure for reference
  8. Global config (config/global.php):
  9. Add 'title' and 'ctitle' keys to $conf array
  10. URL generation (core/system.php):
  11. getSeoUrl() reads from $conf instead of $confse
  12. Language file (admin/language/ru.php):
  13. Add translations for _TSEP, _SEOTITLE, _SEOCTITLE

Benefits:

  • SEO settings are now configurable through the admin interface
  • No more manual file editing required for SEO configuration
  • Consistent with existing admin-managed configuration pattern

Technical notes:

  • config_seo.php entries commented out, not deleted, for reference
  • Backward compatible via ?? default operators in getSeoUrl()
06.02.2026
Style: Shorten PATH_INFO guard comment in security.php
Автор: Eduard Laas | Дата: 21:20 06.02.2026

Condense the inline comment for the PATH_INFO rejection block to a concise single-line description.

Core changes:

  1. Comment update (security.php):
  2. Replace verbose multi-clause comment with shorter form

    • Keeps same technical meaning in fewer words
Docs: Update TESTS.md with test suite inventory
Автор: Eduard Laas | Дата: 21:19 06.02.2026

Add detailed test suite descriptions covering all Unit and Validation tests, including the new safety net tests for Phase 1 refactoring.

Core changes:

  1. Test documentation (docs/TESTS.md):
  2. Add Test Suites section with two subsections: Unit and Validation

    • List every test file with test count and purpose
    • Include PasswordHashTest, InputFilterTest, TemplateIfTest
  3. Add commands for running individual suites and files

Benefits:

  • New contributors can quickly understand test coverage
  • Clear mapping between test files and CMS components
Test: Add safety net tests for Phase 1 security refactoring
Автор: Eduard Laas | Дата: 21:15 06.02.2026

Add 41 new unit tests covering password hashing, input filtering, and template conditionals to establish a regression baseline before the upcoming security hardening changes.

Core changes:

  1. Password hash tests (PasswordHashTest.php):
  2. Verify md5_salt() algorithm: md5(md5(salt) . md5(pass))

    • Consistency, hex format, salt dependency, known values
    • Unicode and special character handling
  3. Validate future bcrypt format for migration readiness
  4. Input filter tests (InputFilterTest.php):
  5. num_filter: digit extraction, non-numeric handling, edge cases
  6. var_filter: allowed chars, Unicode support, XSS prevention
  7. isVar: alphanumeric validation, array handling
  8. text_filter: HTML escaping, BBCode stripping, type modes
  9. url_filter: protocol prefixing, empty handling
  10. save_text: quote/dollar/backslash escaping
  11. Template conditional tests (TemplateIfTest.php):
  12. setTemplateIf: true/false branches, else blocks

    • Nested conditions, string true/false coercion
    • Undefined flags, multiple independent ifs
    • Whitespace tolerance in tags

Benefits:

  • Regression safety net before password_hash migration
  • Baseline for eval() removal in template system
  • Validates filter behavior before SQL parameterization

Technical notes:

  • Uses algorithm replicas to avoid system.php dependency chain
  • All 113 project tests pass (54 new + 59 existing)
  • No changes to production code
Fix: Block PATH_INFO bypass requests in security guard
Автор: Eduard Laas | Дата: 21:15 06.02.2026

Add early rejection of index.php/... style URL requests that could bypass CMS routing and expose internal query parameters.

Core changes:

  1. Request validation (security.php):
  2. Detect PATH_INFO tricks via $_SERVER['PATH_INFO'] and URL pattern

    • Returns 404 for /index.php/name=files&op=view style requests
    • Prevents URL-based parameter injection bypass

Benefits:

  • Blocks a class of URL manipulation attacks
  • No impact on normal CMS operation

Technical notes:

  • Runs before any routing or module loading
  • Sets $_GET['error'] = 404 for CMS error page handling
  • Compatible with all PHP versions >= 8.1
Fix: Add isset guard for $admin[3] access and normalize defaults to 0
Автор: Eduard Laas | Дата: 09:57 06.02.2026

Admin editor flag $admin[3] was accessed without null check in admin.php and had inconsistent default value (1) in system.php textarea functions.

Core changes:

  1. Admin editor flag guard (core/admin.php):
  2. Add isset($admin[3]) check with default 0

    • Prevents potential warning if admin session data is incomplete
  3. Normalize editor defaults (core/system.php):
  4. Change default from 1 to 0 in textarea() and textareae()

    • Aligns with security.php pattern: ($admin[3] ?? '') -> (int)'' = 0
    • Default 0 = no visual editor when flag unavailable

Benefits:

  • Consistent default behavior across all $admin[3] access points
  • Defensive coding against incomplete session data

Technical notes:

  • $admin[3] stores editor flags, first char = visual editor toggle
  • No runtime errors observed yet (admin always authenticated), but guards added for robustness and PHP 8.1+ strict compliance

Fix: Resolve PHP 8.1+ undefined array key warnings for $user[3]
Автор: Eduard Laas | Дата: 09:50 06.02.2026

Guest/bot visitors triggered 4300+ "Undefined array key 3" warnings daily because $user is an empty array for non-authenticated visitors, but $user[3] (story number preference) was accessed without null check.

Core changes:

  1. Module pagination calls (11 modules):
  2. Add null coalescing default: $user[3] ?? 0

    • forum, files, links, pages, faq, shop, media, jokes, help,
auto_links, account
  • Consistent numeric default 0 for user_news() parameter
  • getUserNews function (core/system.php):
  • Extract $user[3] ?? 0 into local variable $unum

    • Prevents potential warning in direct array access
    • Maintains existing !empty() fallback logic

Benefits:

  • Eliminates most frequent error in production logs (4321 occurrences)
  • Clean PHP 8.1+ compatibility for guest/bot traffic
  • No behavioral change for authenticated users

Technical notes:

  • $user array is [] for guests (security.php:71), cannot be padded with defaults because if ($user) login checks rely on empty array

  • user_news() already handles empty $unum via !empty() check
Fix: Resolve RSS feed SQL errors and improve SQL error logging
Автор: Eduard Laas | Дата: 09:50 06.02.2026

RSS feeds returned SQL syntax errors for all module types (news, files, pages, shop, faq) due to missing $confrs variable in function scope, causing truncated LIMIT clause. SQL error logging was also corrupted by text_filter() stripping <= operators from logged queries.

Core changes:

  1. RSS feed SQL fix (core/user.php):
  2. Add $confrs to global declaration in rss_channel()

    • require_once was skipped because rss.php already loaded in system.php
    • $confrs undefined caused $num=null, producing "LIMIT " without value
  3. Replace deprecated $_GET access with null coalescing operator

    • $_GET['name'], $_GET['cat'], $_GET['num'], $_GET['id']
  4. SQL error logging fix (core/security.php):
  5. Replace text_filter() with htmlspecialchars() in error_sql_log()

    • text_filter() used strip_tags() which treated <= as HTML tag
    • All SQL after <= NOW() was silently stripped from error logs

Benefits:

  • RSS feeds now work correctly for all module types
  • SQL error logs show complete, untruncated queries
  • Eliminates PHP 8.1+ undefined array key warnings in RSS

Technical notes:

  • Root cause: system.php:35 loads rss.php globally, require_once in rss_channel() was a no-op, $confrs stayed undefined in function scope

  • Affected ~30+ SQL errors per day from bot/crawler RSS requests
Chore: Add composer.phar to .gitignore
Автор: Eduard Laas | Дата: 00:08 06.02.2026

Exclude Composer binary from version control as it should be installed separately on each machine, not shipped with the project.

Chore: Restore config_seo.php as external SEO configuration
Автор: Eduard Laas | Дата: 00:06 06.02.2026

Restore the SEO configuration file that was previously merged into core/system.php, keeping config separate from core logic.

Core changes:

  1. SEO configuration (config/config_seo.php):
  2. Restore $confse array with all SEO settings

    • URL rewrite toggle and separators
    • Keyword generation settings (count, length, shuffle)
    • Auto-description and long title options
    • Open Graph meta tags template
    • Schema.org structured data template

Benefits:

  • Keeps configuration separate from core system code
  • Easier to edit SEO settings without touching system.php
  • Consistent with other config files (modules, comments, etc.)

Всего: 1136 на 114 страницах по 10 на каждой странице

1 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 114
Хотите опробовать SLAED CMS в действии?
Идеи и предложения
Обратная связь
Подтверждение

Поделиться
QR-код