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

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

Всего: 872 Доступных коммитов | Отфильтровано: 872 Коммиты | Страница: 64 / 88
25.02.2026
Fix: Add defis type and case-insensitive filter dispatch to getVar()
Автор: Eduard Laas | Дата: 15:31 25.02.2026

Extends getVar() with a new 'defis' filter type that URL-encodes string input while leaving pre-encoded defaults untouched; also normalises all filter key lookups to lowercase so callers may use any casing.

Core changes:

  1. New filter type (core/security.php):
  2. Add 'defis' => urlencode(trim($v)) to the filters map

    • Returns '' (not false) for blank strings
    • Skips encoding when the value comes from $default
  3. Case-insensitive dispatch (core/security.php):
  4. All $filters[$type] lookups replaced with $filters[strtolower($type)]

    • Covers both the array-branch and the scalar-branch paths
    • Prevents silent no-ops when callers pass mixed-case type strings
  5. Special defis path (core/security.php):
  6. Dedicated early-return block for 'defis' type

    • Falls back to $default as-is (already encoded)
    • Returns false only when both value and default are empty

Benefits:

  • Enables safe URL-segment encoding via getVar() without raw urlencode() calls
  • Eliminates filter-miss bugs caused by type-string casing differences
  • Consistent fallback semantics across all filter types

Technical notes:

  • No change to existing filter behaviour or function signature
  • Backward compatible: callers using lowercase types are unaffected
  • 'defis' default is passed through unchanged (expected to be pre-encoded)
24.02.2026
Refactor: Remove unused globals from forum module
Автор: Eduard Laas | Дата: 22:52 24.02.2026

Removes stale global variable declarations from forum() and view() to keep function signatures accurate and reduce unnecessary imports.

Core changes:

  1. Forum frontend (modules/forum/index.php):
  2. forum(): remove unused $user global
  3. view(): remove unused $admin_file and $locale globals

Benefits:

  • Accurate global declarations prevent confusion during maintenance
  • Slight reduction in unnecessary variable imports per request
  • Architecture alignment with the $afile rename across the codebase

Technical notes:

  • No behavioral change
  • Backward compatible
Refactor: Modernize files admin module
Автор: Eduard Laas | Дата: 22:52 24.02.2026

Rewrites the files admin module using standard SLAED conventions: canonical function names, getVar() input handling, prepared SQL statements, and modern template calls. Copyright year updated to 2026.

Core changes:

  1. Files admin (modules/files/admin/index.php):
  2. Replace files_navi() with navi() using getAdminTabs()
  3. Rename functions to short canonical names

    • files_add() -> add(), files_delete() -> del(), etc.
  4. Replace all raw $_POST/$_GET with getVar()
  5. Use prepared SQL statements with named placeholders throughout
  6. Replace tpl_eval()/tpl_warn() with setTemplateBasic()/setTemplateWarning()
  7. Replace $admin_file with $afile throughout
  8. Update op= route names to match new function names
  9. Switch to single-quoted strings consistently
  10. Update copyright year to 2026

Benefits:

  • SQL injection eliminated throughout the module
  • Input validated at entry points via getVar()
  • Consistent architecture with other modernized admin modules
  • Maintainability improved by short canonical function names

Technical notes:

  • op= route values changed to match new function names
  • Backward compatible with the database schema
Refactor: Modernize clients admin module
Автор: Eduard Laas | Дата: 22:52 24.02.2026

Rewrites the clients admin module using standard SLAED conventions: canonical function names, getVar() input handling, prepared SQL statements, and modern template calls. SQL injection in save/delete queries eliminated. Missing exit after redirects added.

Core changes:

  1. Clients admin (modules/clients/admin/index.php):
  2. Replace clients_navi() with navi() using getAdminTabs()
  3. Rename functions to short canonical names:

    • clients_add() -> add()
    • clients_save() -> save()
    • clients_delete() -> del()
    • clients_active() -> status()
    • clients_info() -> info()
  4. Replace all raw $_POST/$_GET with getVar()
  5. Fix SQL injection in save(): prepared statements with named placeholders
  6. Replace tpl_eval()/tpl_warn() with setTemplateBasic()/setTemplateWarning()
  7. Replace $admin_file with $afile throughout
  8. Add exit after header() in del() and status()
  9. Rewrite switch to compact form with named cases
  10. Add missing newline at end of file

Benefits:

  • SQL injection in save and delete queries eliminated
  • Input sanitized via getVar() throughout
  • Missing exit after redirect now present
  • Consistent naming convention across admin modules

Technical notes:

  • op= route values changed to match new function names
  • Backward compatible with the database schema
Refactor: Modernize auto_links admin module
Автор: Eduard Laas | Дата: 22:51 24.02.2026

Rewrites the auto_links admin module to follow current SLAED architecture: standard function naming, getVar() input handling, prepared SQL statements, and modern template calls. SQL injection in the stats query is eliminated. Copyright year updated to 2026.

Core changes:

  1. Auto-links admin (modules/auto_links/admin/index.php):
  2. Replace auto_links_navi() with navi() using getAdminTabs()
  3. Rename all functions to short canonical names:

    • auto_links_stat() -> stats()
    • auto_links_add() -> add()
    • auto_links_save() -> save()
    • auto_links_delete() -> del()
    • auto_links_conf() -> conf()
    • auto_links_conf_save() -> confsave()
    • auto_links_info() -> info()
    • nullhits() and noindel() extracted from switch as named functions
  4. Replace all raw $_POST/$_GET with getVar()
  5. Fix SQL injection in stats(): prepared statement with :lid placeholder
  6. Replace tpl_eval()/tpl_warn() with setTemplateBasic()/setTemplateWarning()
  7. Replace $admin_file/$aroute with $afile throughout
  8. Use $conf['auto_links'] sub-array instead of $confal
  9. Rewrite switch to compact form with named cases
  10. Remove closing ?>
  11. Update copyright year to 2026

Benefits:

  • SQL injection in stats query eliminated
  • Input validated through getVar() at all entry points
  • Consistent naming convention with other modernized modules
  • Maintainability improved by short, readable function names

Technical notes:

  • op= route values changed to match new function names
  • $confal replaced by $conf['auto_links'] sub-array
  • Routing layer must map new op names
Refactor: Rename $aroute/$admin_file to $afile in account module
Автор: Eduard Laas | Дата: 22:51 24.02.2026

Aligns the account admin and frontend module with the canonical $afile variable, and removes unused globals from checkuser() and view().

Core changes:

  1. Account admin (modules/account/admin/index.php):
  2. Replace $aroute with $afile in navi(), users(), add(), addsave(), newuser(), nullpoints(), nullsave(), conf(), save(), newdel(), del()

  3. Fix navi() call spacing: navi(0,0,0,0) -> navi(0, 0, 0, 0)
  4. Account frontend (modules/account/index.php):
  5. Replace $admin_file with $afile in view()
  6. Remove unused $conf from checkuser() globals

Benefits:

  • Consistent $afile usage across frontend and admin sides
  • Eliminates unnecessary global imports
  • Architecture alignment with modernized modules

Technical notes:

  • No behavioral change; pure identifier rename
  • Backward compatible
Refactor: Rename $aroute to $afile in admin panel modules
Автор: Eduard Laas | Дата: 22:50 24.02.2026

Eliminates the legacy $aroute variable from all four admin panel modules, replacing it with the canonical $afile identifier. Also removes the pwd field from admin list and edit queries to avoid exposing password hashes unnecessarily in list views.

Core changes:

  1. Admins manager (admin/modules/admins.php):
  2. Replace $aroute with $afile in admins(), add(), save(), del()
  3. Remove pwd column from SELECT in admins() list query
  4. Remove pwd from SELECT and list() destructuring in add()
  5. Blocks manager (admin/modules/blocks.php):
  6. Replace $aroute with $afile in all functions

    • add(), fileadd(), fileedit(), fix(), addsave(), filecode()
    • filecodesave(), edit(), editsave(), change(), del()
  7. Config manager (admin/modules/config.php):
  8. Replace $aroute with $afile in config(), save()
  9. Modules manager (admin/modules/modules.php):
  10. Replace $aroute with $afile in navi(), modules(), edit(), status(), save()

Benefits:

  • Consistent use of $afile across the entire admin panel
  • Removing pwd from queries reduces attack surface in list views
  • Simpler global declarations in each function

Technical notes:

  • No behavioral change beyond the variable rename
  • $afile is injected by the admin bootstrap
  • Backward compatible
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.

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

1 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 88

Хотите опробовать SLAED CMS в действии?

Идеи и предложения
Обратная связь