UWAGA: W PHP wykryto krytyczne podatności, przez które Wasze strony/fora mogą zostać zhakowane! Dzisiaj mają być udostępnione poprawione wersje, warto monitorować i ustawić odpowiendie wersje PHP na swom serwerze.

Poprawki będę zawarte w wersjach PHP: 8.5.12, 8.4.27, 8.3.36 oraz 8.2.35! Jeśli używacie jeszcze wersje PHP 7.x lub 8.0.x lub 8.1.x, należy, jak najszybciej podnieść wersje PHP i/lub zaktualizować swoje fora!

Do momentu wdrożenia oficjalnej łatki, ryzyko ataku można drastycznie zmniejszyć poprzez zmianę konfiguracji w pliku php.ini:
Ustaw: session.upload_progress.enabled = Off

Albo np., można zrobić: https://ma.ttias.be/php-cve-2026-109618 ... itigation/

Dla serwera Apache ustaw w pliku .htaccess

Kod: Zaznacz cały

RewriteEngine On
RewriteCond %{HTTP:Content-Type} multipart/form-data [NC]
RewriteRule ^ - [F]
i/lub - nie testowałem

Kod: Zaznacz cały

<If "req('Content-Type') =~ /multipart/i">
    Require all denied
</If>

Dla nginx

Kod: Zaznacz cały

# http {} context, e.g. /etc/nginx/conf.d/block-multipart.conf
map $http_content_type $block_multipart {
    default       0;
    "~*multipart" 1;
}

# inside every server {} that passes requests to PHP, including default/catch-all servers
if ($block_multipart) {
    return 403;
}
_____________________________________________________

Pojawiła się nowa wersja systemu - phpBB 3.3.19. Ostatnie wydania (od wersji 3.3.17 do najnowszej) przynoszą kluczowe poprawki, które chronią Twoje forum przed zagrożeniami i dbają o spokój Twojej społeczności. Polecam nie odkładać tego na później, tyllko zaktualizować fora!

Polski pakiet językowy dla phpBB 3.3.19

Automatyczna naprawa bazy danych

Forum przeznaczone dla osób poszukujących modyfikacji do phpBB 3.0.x oraz ich polskich lokalizacji.
Awatar użytkownika
daroPL
Administrator
Posty: 4564
Rejestracja: 24 czerwca 2005, 13:36
Lokalizacja: Poznań
Kontakt:

Re: Automatyczna naprawa bazy danych

Post autor: daroPL » 13 lipca 2009, 15:57

Polenie REPAIR TABLE odnosi się do popsutych tabel, a nie do tabel z nadmiarem.

Zawsze możesz sprawdzić czy ten "mod" działa wykonując zapytanie REPAIR TABLE nazwa_tabeli; dla tabeli, która po odpaleniu moda jest nadal popsuta.

Awatar użytkownika
@Marcin
Zasłużony
Posty: 1635
Rejestracja: 08 lutego 2009, 21:27
Lokalizacja: Nowa Ruda (PL) / Milton Keynes (UK)
Kontakt:

Re: Automatyczna naprawa bazy danych

Post autor: @Marcin » 13 lipca 2009, 16:15

Czyli jak by to miało wygladać w praktyce? Musze to dodać do kodu? czy zapytanie w phpmyadminie wykonywać?
I jak dodac jeszcze optymalizacje?
Wsparcie phpBB PL !!

Awatar użytkownika
daroPL
Administrator
Posty: 4564
Rejestracja: 24 czerwca 2005, 13:36
Lokalizacja: Poznań
Kontakt:

Re: Automatyczna naprawa bazy danych

Post autor: daroPL » 13 lipca 2009, 16:18

Wykonaj w phpMyAdminie dla tabeli, której nie naprawił ten skrypt i napisz czy jest tak jak chciałeś.

Awatar użytkownika
@Marcin
Zasłużony
Posty: 1635
Rejestracja: 08 lutego 2009, 21:27
Lokalizacja: Nowa Ruda (PL) / Milton Keynes (UK)
Kontakt:

Re: Automatyczna naprawa bazy danych

Post autor: @Marcin » 13 lipca 2009, 16:20

wykonałem zapytanie: REPAIR TABLE phpbb_acl_groups; i działa :)
Wsparcie phpBB PL !!

Awatar użytkownika
daroPL
Administrator
Posty: 4564
Rejestracja: 24 czerwca 2005, 13:36
Lokalizacja: Poznań
Kontakt:

Re: Automatyczna naprawa bazy danych

Post autor: daroPL » 13 lipca 2009, 16:30

Hmmm...to może spróbuj zmienić w podanym przez we3ba skrypcie

Kod: Zaznacz cały

mysql_query('REPAIR TABLE' . $row['table_name']);
na

Kod: Zaznacz cały

mysql_query('REPAIR TABLE ' . $row['table_name']);
może to wina zagubionej spacji.

Awatar użytkownika
@Marcin
Zasłużony
Posty: 1635
Rejestracja: 08 lutego 2009, 21:27
Lokalizacja: Nowa Ruda (PL) / Milton Keynes (UK)
Kontakt:

Re: Automatyczna naprawa bazy danych

Post autor: @Marcin » 13 lipca 2009, 16:40

niestety nic się nie zmienia..
Wsparcie phpBB PL !!

Awatar użytkownika
daroPL
Administrator
Posty: 4564
Rejestracja: 24 czerwca 2005, 13:36
Lokalizacja: Poznań
Kontakt:

Re: Automatyczna naprawa bazy danych

Post autor: daroPL » 13 lipca 2009, 16:43

To spróbuj między klamry po tym poleceniu mysql_query wstawić te dwie linie

Kod: Zaznacz cały

echo mysql_error();
echo mysql_errno();
i napisz czy coś pokazuje przy uruchamianiu skryptu oprócz "done"?

Awatar użytkownika
@Marcin
Zasłużony
Posty: 1635
Rejestracja: 08 lutego 2009, 21:27
Lokalizacja: Nowa Ruda (PL) / Milton Keynes (UK)
Kontakt:

Re: Automatyczna naprawa bazy danych

Post autor: @Marcin » 13 lipca 2009, 17:14

wywaliło mi potężny błąd

Kod: Zaznacz cały

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11064Done!
Wsparcie phpBB PL !!

Awatar użytkownika
daroPL
Administrator
Posty: 4564
Rejestracja: 24 czerwca 2005, 13:36
Lokalizacja: Poznań
Kontakt:

Re: Automatyczna naprawa bazy danych

Post autor: daroPL » 13 lipca 2009, 18:07

Kod: Zaznacz cały

<?php

include 'config.php';

// Connect and select database
$link = mysql_connect($dbhost, $dbuser, $dbpasswd)
	or die(mysql_error());

mysql_select_db($dbname);

// Get tables list
$query = mysql_query('SHOW TABLES')
	or die(mysql_error());

// Save table to array and repair each table
while ($table = mysql_fetch_assoc($query)) {
	mysql_query('REPAIR TABLE ' . $table['Tables_in_' . $dbname]);
echo mysql_error() . '<br />';
echo mysql_errno() . '<br />';
}

// Result if no errors
echo 'Done!';

?>
zobacz czy to działa

Awatar użytkownika
@Marcin
Zasłużony
Posty: 1635
Rejestracja: 08 lutego 2009, 21:27
Lokalizacja: Nowa Ruda (PL) / Milton Keynes (UK)
Kontakt:

Re: Automatyczna naprawa bazy danych

Post autor: @Marcin » 13 lipca 2009, 18:21

hm, działa bo naprawiło a wynik jest taki:

Kod: Zaznacz cały

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0
Done!
Wsparcie phpBB PL !!

Zablokowany

Wróć do „Poszukiwania”