Magento 2 admin account locked by brute force attack – unlock and protection
An administrator account was locked after a dictionary attack – 10,000 login attempts in one hour. Magento locks an account after 6 failed attempts for 30 minutes. Problem: the attacker kept resetting the counter by changing IP, while the real admin could not log in. Fix time: 1 hour.
- Published in Magento / Adobe Commerce
Union-Find (Disjoint Set) – PHP implementation, cycle detection, deduplication
Union-Find (Disjoint Set Union) is a data structure for managing disjoint sets. It supports two operations in nearly O(1) time: checking whether two elements belong to the same set (Find) and merging two sets (Union). The algorithm appears in graph problems, cycle detection and element grouping. In Magento 2 it is useful for merging duplicate customers and products.
- Published in Algorytmy
Magento 2 cron stuck – 50,000 pending jobs and deadlock in cron_schedule
Magento 2 cron stopped working – over 50,000 unexecuted jobs were backed up in the cron_schedule table. Transactional emails were not going out, indexers were not updating, pricing rules were not refreshing. The shop worked normally for customers but was frozen “from the inside”. Fix time: 3 hours.
- Published in Magento / Adobe Commerce
PHP 8.3 – readonly classes, json_validate(), typed constants, #[Override]
PHP 8.3 doprecyzował i rozszerzył kilka funkcji które były już w 8.1 i 8.2. Readonly properties dostały nowe możliwości, json_validate() zastąpiło powszechny hack z json_decode + sprawdzeniem błędu, a nowe funkcje tablic i typowanie klas wbudowanych zamknęły kilka długo otwartych luk. Pokażę zmiany które mają realny wpływ na codzienne pisanie kodu w Magento 2.
- Published in PHP
