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

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

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

Всего: 1045 Доступных коммитов | Отфильтровано: 1045 Коммиты | Страница: 82 / 105
24.02.2026
Fix: Harden rss_read() — timeout, charset, null safety
Автор: Eduard Laas | Дата: 22:50 24.02.2026

Makes the RSS reader safe against slow/unreachable feeds, broken charset declarations, and undefined array offsets that previously caused PHP warnings or silent failures.

Core changes:

  1. RSS reader (core/system.php):
  2. Add stream context with 10-second timeout and follow_location

    • Prevents blocking on unresponsive remote feeds
    • Suppresses file_get_contents warnings via set/restore_error_handler
  3. Fix charset detection and iconv call

    • Regex now matches both double- and single-quoted encoding attr
    • Use iconv with //IGNORE to skip unconvertible bytes gracefully
  4. Replace parse_url() array dereference with parse_url($url, PHP_URL_HOST)

    • Eliminates need to unpack ['host'] with a fallback
  5. Use null-coalescing defaults for $rss_title, $rss_date, $rss_guid, $rss_desc

    • Prevents undefined offset warnings when items lack fields
  6. Guard strtotime() with !== false check

    • Avoids passing false to date()
  7. Change $items[1] truthiness check to !empty()

Benefits:

  • No more blocking requests for dead or slow RSS feeds
  • Eliminates PHP warnings on malformed or incomplete feeds
  • Safer charset conversion without data loss

Technical notes:

  • Requires PHP stream wrappers to be enabled (default on all installs)
  • No schema or config changes required
  • Backward compatible with existing RSS block configs
Refactor: Replace $admin_file/$aroute with $afile in core
Автор: Eduard Laas | Дата: 22:50 24.02.2026

Standardizes the admin file path variable name across core files, aligning with the canonical $afile identifier used throughout the rest of the system. Also trims unused global declarations.

Core changes:

  1. Admin utilities (core/admin.php):
  2. Replace all $admin_file references with $afile

    • getAdminTabs(): nav link generation
    • admininfo(): dashboard block links
    • ajax_cat(): AJAX category actions
    • ajax_block(): AJAX block actions
    • navi_gen() (commented-out legacy): updated for consistency
  3. Add $confu to fav_aliste() globals
  4. User utilities (core/user.php):
  5. Replace $admin_file with $afile in setMessageShow()

    • Admin edit link in the message block
  6. Remove unused $conf from checkuser() in setComShow() context

Benefits:

  • Single canonical name for the admin file path variable
  • Reduces confusion between $admin_file and $aroute variants
  • Architecture alignment with module-level code

Technical notes:

  • No behavioral change; pure identifier rename
  • $afile is already defined in the admin bootstrap
  • Backward compatible
Refactor: unify request input handling and harden module updates
Автор: Eduard Laas | Дата: 18:37 24.02.2026

Replaces direct superglobal access in frontend/admin modules with typed getVar() calls and adds safer update patterns in critical paths to reduce inconsistent filtering and prepare modules for stricter validation rules.

Core changes:

  1. Request normalization across modules (multiple modules/*/index.php):
  2. Replaced direct $_POST/$_GET reads with getVar('post'|'get', ..., 'text'|'num'|'array').

    • Standardizes input typing and fallback behavior.
    • Reduces duplicated manual isset/intval/substr patterns.
  3. Kept existing business logic and flow while tightening data entry points.
  4. Safer persistence/update paths (account and selected module handlers):
  5. Updated write operations to use safer parameter passing where introduced.
  6. Preserved compatibility with current module interfaces and routing.

Benefits:

  • Better reliability of request parsing.
  • Improved maintainability through consistent input access patterns.
  • Stronger security baseline for future hardening.

Technical notes:

  • No schema/storage format changes.
  • Module endpoints and operation names remain unchanged.
  • Backward compatibility preserved at API and template level.
23.02.2026
Fix: Update WHOIS servers and harden connection handling
Автор: Eduard Laas | Дата: 14:58 23.02.2026

Replace deprecated WHOIS server hostnames with current IANA-registered endpoints and add proper timeout and error handling for fsockopen calls in the whois module to prevent hanging requests and PHP warnings.

Core changes:

  1. WHOIS server registry (modules/whois/index.php):
  2. ru: whois.ripn.net → whois.tcinet.ru
  3. com/net: whois.crsnic.net → whois.verisign-grs.com
  4. org: whois.publicinterestregistry.net → whois.publicinterestregistry.org
  5. info: whois.afilias.net → whois.nic.info
  6. de: whois.nic.de → whois.denic.de
  7. ws: whois.nic.ws → whois.website.ws
  8. cn: whois.cnnic.net.cn → whois.cnnic.cn
  9. in/co.in/firm.in/gen.in/ind.in/net.in/org.in: whois.registry.in → whois.nixiregistry.in
  10. Connection handling (modules/whois/index.php):
  11. Add 10s timeout to all fsockopen calls
  12. Replace @ suppression with set_error_handler/restore_error_handler
  13. Remove redundant double-connect retry in whois()
  14. Variable rename (admin/modules/admins.php):
  15. $aroute → $afile for consistency with codebase convention

Benefits:

  • WHOIS lookups no longer fail silently due to dead server hostnames
  • Requests no longer hang indefinitely on unreachable servers
  • No @ error suppression in compliance with project guardrails
Chore: Migrate AI config from .rules/ to .agents/
Автор: Eduard Laas | Дата: 00:02 23.02.2026

Update .gitignore and project structure to reflect the transition from the legacy .rules/ directory to the new .agents/ convention for storing AI-workflow configuration. The git-rules.md file is removed as its content is superseded by the updated agent knowledge base.

Core changes:

  1. Ignored paths (.gitignore):
  2. Add AGENT.md to ignored files

    • Prevents session-specific agent manifests from being tracked
  3. Add .agents/ directory to ignored paths

    • Covers the new convention for AI workflow files
  4. Remove .rules/ from ignored paths

    • Directory is no longer used; rule files moved to .agents/
  5. Removed file (.rules/git-rules.md):
  6. Delete legacy git commit rules document

    • Rules are now maintained inside the .agents/ knowledge base

Benefits:

  • Consistent project layout aligning with current AI workflow conventions
  • Eliminates stale .rules/ directory from the repository
  • .gitignore accurately reflects the real project structure

Technical notes:

  • No functional code changes; configuration and documentation only
  • Backward compatibility: unaffected
20.02.2026
Docs: Sync root documentation with 6.3 codebase state
Автор: Eduard Laas | Дата: 12:37 20.02.2026

Four root markdown files updated to reflect the current state of the 6.3 codebase: corrected typos, updated progress percentage, unified log file extensions to .log, and added the logging hardening changelog that was missing from SECURITY.md.

Core changes:

  1. README.md:
  2. Progress badge and text updated from ~65% to ~70%
  3. chmod example: storage/logs/.txt → storage/logs/.log
  4. Typo PREFIX_DB corrected (was REFIX_DB in SQL code example)
  5. CONTRIBUTING.md:
  6. chmod example: storage/logs/.txt → storage/logs/.log
  7. All code examples use $afile (current canonical variable)
  8. Typo PREFIX_DB corrected in SQL example
  9. SECURITY.md:
  10. Typo PREFIX_DB corrected in SQL example
  11. Module count corrected: "27 modules" → "23 admin modules"
  12. Added Logging & Error Handling Hardening subsection under v6.3.0:

    • set_exception_handler(), register_shutdown_function()
    • Extended set_error_handler() error levels
    • Log rotation fix, .txt → .log rename, addCompress() migration
    • Unified log_size 10 MB and filesize() >= operator
  13. UPGRADING.md:
  14. chmod example: storage/logs/.txt → storage/logs/.log
  15. Status text updated from ~65% to ~70%
  16. Typo PREFIX_DB corrected in SQL example
  17. Troubleshooting log paths corrected:

    • storage/logs/error.log → error_php.log and error_site.log
  18. Renamed Files section: added all 5 log file renames (.txt → .log)

Benefits:

  • Documentation is consistent with current codebase
  • No misleading typos or outdated paths in public-facing docs
  • Logging hardening changes are now traceable in SECURITY.md

Technical notes:

  • $afile is the current canonical variable (replaces deprecated $admin_file)
  • All log channels now use storage/logs/ with .log extension
Fix: Harden statistics block in system.php head()
Автор: Eduard Laas | Дата: 12:37 20.02.2026

The visitor counter / statistics block in head() contained several reliability bugs: unguarded file reads, magic flock numbers, broken date comparison, unsafe $con array access, and missing directory guard before monthly archive rename.

Core changes:

  1. File read guard (core/system.php):
  2. file($spath.'statistic.log') → file_exists() check before file()

    • Prevents PHP warning when statistic.log does not yet exist
  3. flock constants (core/system.php):
  4. Magic numbers 2 and 3 → LOCK_EX and LOCK_UN for clarity
  5. $con array fallbacks (core/system.php):
  6. All $con[N] accesses guarded with ?? 0 to prevent undefined offset notices

    • $con[1], $con[3], $con[4], $con[5], $con[6], $con[7]
  7. $guest variable fix (core/system.php):
  8. !empty($guest) 1 → $guest 1 (double-negation logical error corrected)
  9. Date comparison fix (core/system.php):
  10. String date comparison replaced with filemtime($slog) < strtotime('today midnight')

    • Correct cross-midnight detection without locale-dependent string compare
  11. Directory guard before monthly archive (core/system.php):
  12. mkdir($sdir, 0755, true) added if statistic/ subdirectory does not exist
  13. Guarded unlink() calls (core/system.php):
  14. unlink(ips.log) and unlink(user.log) wrapped in file_exists() checks

Benefits:

  • No PHP warnings on first-run or missing log files
  • Correct guest/session detection logic
  • Safe monthly archive creation even on fresh installations
  • Code intent made explicit via named constants

Technical notes:

  • statistic.log format unchanged: d.m.Y|hosts|hits|allhits|engines|refers|homereqs|users
  • COUNTER_DIR constant must point to storage/counter/
Fix: Harden logging system in security.php
Автор: Eduard Laas | Дата: 12:37 20.02.2026

All 6 log functions unified and hardened: paths moved to LOGS_DIR, extensions renamed from .txt to .log, rotation logic corrected with proper fclose-before-compress pattern, and exception/fatal-error handlers added for complete error coverage.

Core changes:

  1. Log path and extension migration (core/security.php):
  2. config/logs/.txt → LOGS_DIR/.log for all 6 channels

    • log.log, error_site.log, error_sql.log, hack.log, warn.log, error_php.log
  3. Log rotation hardening (core/security.php):
  4. zip_compress() + unlink() → addCompress(dir, src, name, 'auto', true, true)

    • Proper fclose() before compression in all 6 functions
    • fopen() re-check after rotation (fhandle !== false guard)
  5. log_size fallback unified to 10 MB (was 1 MB in log_report)
  6. filesize() comparison unified to >= (was inconsistent > vs >=)
  7. Archive timestamp format unified to Y-m-d_H-i-s
  8. Error handler extensions (core/security.php):
  9. set_exception_handler() added — catches all uncaught exceptions → error_php.log
  10. register_shutdown_function() added — catches E_ERROR, E_PARSE, E_CORE_ERROR, E_COMPILE_ERROR
  11. set_error_handler() extended: cases 256 (USER_ERROR), 512 (USER_WARNING), 1024 (USER_NOTICE), 4096 (RECOVERABLE_ERROR), 16384 (USER_DEPRECATED)

  12. Variable shadowing fixed in error_sql_log(): $log parameter renamed to $sql

Benefits:

  • Fatal errors and uncaught exceptions now logged reliably
  • No file corruption from compress-while-open race condition
  • All log channels use consistent paths and size limits
  • Archives carry second-precision timestamps to prevent collisions

Technical notes:

  • LOGS_DIR constant must point to storage/logs/
  • addCompress() with $del=true handles archive and source deletion atomically
  • error_php.log used for both exception handler and shutdown function
Chore: Expand .gitattributes to enforce LF for all text files
Автор: Eduard Laas | Дата: 10:11 20.02.2026

Adds explicit eol=lf rules for all relevant text file types and marks binary assets to prevent line ending conversion.

Core changes:

  1. .gitattributes:
  2. Added global fallback: * text=auto eol=lf
  3. Added eol=lf for html, css, js, json, sql, xml, tpl, md, txt, ini, yaml, .htaccess
  4. Added binary markers for images, fonts, archives, pdf

    • Prevents Git from treating binaries as text and corrupting them

Benefits:

  • Consistent LF line endings across all editors and OS
  • No CRLF creep on Windows checkouts
  • Binary files protected from line ending conversion
Fix: Harden error_reporting_log() in security.php
Автор: Eduard Laas | Дата: 10:04 20.02.2026

Fixes error suppression, inconsistent comparisons and naming in the PHP error log rotation block of error_reporting_log().

Core changes:

  1. error_reporting_log() (core/security.php):
  2. Removed @ from fopen() calls, replaced with explicit !== false checks

    • Follows rule 2.8: never use error suppression operator
  3. Renamed \$path -> \$log for consistency with addErrorFile() in system.php
  4. Moved \$cfg = \$conf['security'] ?? [] inside if (\$error_write) block

    • \$cfg only needed when actually writing; skipped for NOTICE etc.
  5. Extracted \$max = \$cfg['log_size'] ?? 10485760 as named variable
  6. Changed filesize comparison > to >= (consistent with addErrorFile())
  7. Replaced \$ts/\$rot pattern with clean \$safe via pathinfo()

    • Result: error_php_2024-01-01_12-00-00.zip instead of error_php.log.20240101_120000.zip
  8. Updated addCompress() call to use \$bak=true for .bak fallback

Benefits:

  • No error suppression antipattern
  • Consistent variable naming across both log rotation functions
  • Cleaner archive filenames without double extension
  • .bak fallback guaranteed when no compression available

Technical notes:

  • Behavior identical when fopen() succeeds and compression is available
  • \$cfg scoped to write path only: minor efficiency gain on non-write errors

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

1 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 105
Хотите опробовать SLAED CMS в действии?
Идеи и предложения
Обратная связь
Подтверждение

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