1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-25 20:44:01 +01:00

853 Commits

Author SHA1 Message Date
Yuriy Rusko
a275d17625 [ticket/9859] Changing all phpBB footers to match the new credit line
PHPBB3-9859
2011-07-06 21:46:33 -04:00
Nils Adermann
a5ef6c3b20 [ticket/10188] Prevent semi-compressed output
When a non-fatal error occurs at the beginning of the script before any custom
error handler is set one of two situations can be encountered:

1) if the ini option output buffer is disabled:
      - headers are sent to the http client
      - the error message is output
2) if the ini option output_buffer is enabled or the script
   is run within an ob_start()/ob_end() wrapper:
      - the error message is written to the output buffer

Once the script reaches page_header() phpbb starts gzip compression if enabled.
This is done through ob_start with a ob_gzhandler as a callback. The
compression is skipped if headers have already been sent. In situation 1) the
error message sent in plain text comes with headers and this gzip compression
is skipped. The client receives a plaintext version of the page. However in
situation 2) headers have not been sent yet and the rest of the page will be
compressed. The result is a plaintext error message followed by compressed
output. The client does not understand this output resulting in either an
error message or simply a blank page in the browser.

In addition to the above situation this problem occurs with errors that are
triggered after the custom error handler is loaded. The problem has been
noticed before, and a workaround was found. The error handler would call
ob_flush() for particular configuration settings before outputting the error
message. This resulted in headers being sent when output buffering was enabled
thus disabling gzip compression for the rest of the page. The constraints under
which ob_flush() was called were lessened over time whenever a new case was
found that would trigger this problem. Eventually ob_flush() would be called
even when code causing an E_NOTICE was simply run within an ob_start/ob_end.
This makes it impossible to use output buffering to retrieve the content of an
error message without prohibiting the page from setting headers afterwards.

This commit removes all flushing in msg_handler completely and instead fixes
the problem for both errors before and after the error handler is registered.
GZIP compression is only enabled if there is at most one level of output
buffering (e.g. the output_buffer php.ini option is enabled) and if there has
not yet been any output in this buffer. This should avoid any partial output
compression.

PHPBB3-10188
2011-06-26 20:31:22 +02:00
Andreas Fischer
8c01ed578d [ticket/10234] Report E_WARNING errors as "PHP Warning" instead of "PHP Notice"
PHPBB3-10234
2011-06-20 00:03:20 +02:00
Andreas Fischer
b64159c001 Merge remote-tracking branch 'naderman/ticket/7057' into develop-olympus
* naderman/ticket/7057:
  [ticket/7057] Use GET for quicksearch and add session id to hidden fields
  [ticket/7057] Remove trailing whitespace in functions.php
2011-06-09 13:10:48 +02:00
Nils Adermann
893d0ae96f Merge branch 'ticket/bantu/10042' into develop-olympus
* ticket/bantu/10042:
  [ticket/10042] GD CAPTCHA: Call phpbb_mt_rand() where required.
  [ticket/10042] GD CAPTCHA: Round offset to the next pixel.
  [ticket/10042] Add mt_rand() wrapper which allows swapping $min and $max.
2011-06-05 03:22:09 +02:00
Nils Adermann
6e8b59dce3 [ticket/7057] Use GET for quicksearch and add session id to hidden fields
Without sid a GET form logs a user out if they have cookies disabled.

PHPBB3-7057
2011-06-02 10:10:42 +02:00
Nils Adermann
d270f736e3 [ticket/7057] Remove trailing whitespace in functions.php
PHPBB3-7057
2011-06-02 10:09:40 +02:00
Nils Adermann
324c913ac9 [ticket/9950] Use actual language instead of user's language in overall header
PHPBB3-9950
2011-06-02 06:24:28 +02:00
Andreas Fischer
e4681f0929 Merge remote-tracking branch 'p/ticket/10191' into develop-olympus
* p/ticket/10191:
  [ticket/10191] Use ob_get_level in exit_handler for output buffering check.
2011-05-23 10:18:49 +02:00
Oleg Pudeyev
44cc8153cd [ticket/10191] Use ob_get_level in exit_handler for output buffering check.
Calling flush() when output buffering is enabled causes output to be
duplicated. Besides phpBB enabling output buffering for gzip compression,
output buffering may be enabled externally to phpBB via output_handler
or output_buffering directives in php.ini.

Use ob_get_level to determine whether output buffering is active and
call ob_flush in that case.

PHPBB3-10191
2011-05-22 07:16:40 -04:00
Oleg Pudeyev
9b62500a10 [ticket/10188] Use ob_get_level in msg_handler for output buffering check.
Output buffering may be enabled via various approaches, among them:

 * output_buffering in php.ini;
 * output_handler in php.ini enables output_buffering;
 * ob_start call.

ob_get_level allows us to query php runtime for the actual output buffering
status.

PHPBB3-10188
2011-05-22 06:48:59 -04:00
Oleg Pudeyev
5e81b058cf Merge remote-tracking branch 'bantu/ticket/10146' into develop-olympus
* bantu/ticket/10146:
  [ticket/10146] Firebird: 1 <= precision <= 18 ==> Cast to DECIMAL(18, 0).
2011-05-13 19:32:35 -04:00
Andreas Fischer
9cb6a69861 [ticket/10146] Firebird: 1 <= precision <= 18 ==> Cast to DECIMAL(18, 0).
PHPBB3-10146
2011-04-22 11:01:07 +02:00
Oleg Pudeyev
682814180c [ticket/7941] Added @return to generate_board_url docstring.
PHPBB3-7941
2011-04-17 18:46:03 -04:00
Oleg Pudeyev
200c7e3c44 Merge branch 'ticket/igorw/10101' into develop-olympus
* ticket/igorw/10101:
  [ticket/10101] Add test case for native phpass hashes
  [ticket/10101] Add support for native phpass hashes
2011-03-22 21:25:00 -04:00
Igor Wiedler
f8384b7302 [ticket/10101] Add support for native phpass hashes
phpass (the hashing library we use) adds a hash identifier to every
hash. By default this identifier is '$P$'. For some reason we have
changed it to '$H$'.

This patch allows both of them to be used for authentication, so that a
third party system could create users with '$P$' hashes.

PHPBB3-10101
2011-03-17 23:59:38 +01:00
Andreas Fischer
48ba841be0 [ticket/10100] Update rand_seed_last_update before rand_seed in unique_id().
Update $config['rand_seed_last_update'] before updating $config['rand_seed'] in
unique_id() to mitigate a race condition and unnecessary updates on heavily
busy boards.

PHPBB3-10100
2011-03-17 23:07:35 +01:00
Oleg Pudeyev
64657ee366 [ticket/10096] Fixed whitespace in functions.php.
PHPBB3-10096
2011-03-13 23:12:52 -04:00
Oleg Pudeyev
9a48045254 [ticket/10046] Do not link bots to cron.php.
Bots, generally speaking, will not request cron.php immediately,
thus telling them to request it is pointless.

PHPBB3-10046
2011-03-12 14:57:34 +01:00
Andreas Fischer
33c38b37d8 Merge branch 'ticket/p/10016' into develop-olympus
* ticket/p/10016:
  [ticket/10016] Add comment for text casting (for PostgreSQL 7.x)
  [ticket/10016] Leave Firebird unchanged.
  [ticket/10016] Fixed varchar to decimal cast on postgresql 7.x.
2011-03-11 01:45:45 +01:00
Andreas Fischer
9cdeb51a52 [ticket/10016] Add comment for text casting (for PostgreSQL 7.x)
PHPBB3-10016
2011-03-05 22:55:58 +01:00
Andreas Fischer
841061426d [ticket/10016] Leave Firebird unchanged.
PHPBB3-10016
2011-03-05 22:48:24 +01:00
Andreas Fischer
5ab4dc2983 [ticket/10042] Add mt_rand() wrapper which allows swapping $min and $max.
PHPBB3-10042
2011-03-05 22:16:50 +01:00
Oleg Pudeyev
0e861ac3ab [ticket/10029] Use $_SERVER['SERVER_PROTOCOL'] for determining HTTP version.
PHPBB3-10029
2011-02-09 02:19:50 -05:00
Oleg Pudeyev
56c202127c [ticket/10016] Fixed varchar to decimal cast on postgresql 7.x.
PHPBB3-10016
2011-01-28 21:06:49 -05:00
rxu
ab9d4b3b63 [ticket/8779] Slow search for 'View unread posts'
Adjust SQL query to speedup search for unread posts (thanks naderman).

PHPBB3-8779
2011-01-24 00:01:18 +07:00
Nils Adermann
ba5c7d8e63 Merge branch 'ticket/bantu/9859' into develop-olympus
* ticket/bantu/9859:
  [ticket/9859] Remove the years from the copyright statements in docs files.
  [ticket/9859] Remove the year from the copyright meta tag in docs/*.html
  [ticket/9859] Remove the meta copyright tag as well.
  [ticket/9859] Remove the credit line comment from all html files.
  [ticket/9859] Remove years in credit line from some more files.
2011-01-16 22:25:49 +01:00
rxu
2b37a4fe56 [ticket/9933] Remove empty word check.
PHPBB3-9933
2011-01-16 20:14:35 +01:00
Andreas Fischer
97be6e7946 [ticket/9933] Add $use_unicode parameter to get_censor_preg_expression().
Rename $unicode to $unicode_support, pass in $use_unicode defaulting to true.

In unit tests we can now pass in $use_unicode as false and also test the code
path that is taken when PCRE does not support unicode.

PHPBB3-9933
2011-01-16 20:13:05 +01:00
rxu
8c1866bc0c [ticket/9933] Adjust word censor regex for non-unicode mode.
PHPBB3-9933
2011-01-16 19:55:10 +01:00
Andreas Fischer
2a703b4055 [ticket/9859] Remove years in credit line from some more files.
Standard HTML output now includes:
Powered by <a href="http://www.phpbb.com/">phpBB</a> &copy; phpBB Group

Print output now includes:
Powered by phpBB &copy; phpBB Group<br />http://www.phpbb.com/

This also fixes an inconsistency where "phpBB Group" was linked instead of
"phpBB".

PHPBB3-9859
2011-01-16 17:53:30 +01:00
rxu
951b7b22e0 [ticket/9933] Move word censor regex into separate function in functions.php
PHPBB3-9933
2011-01-07 15:32:34 +01:00
Joas Schilling
5ec1c88795 [ticket/9930] Redirect failes with open_basedir enabled.
Open_basedir does not allow file_exists() for "." and directories without a
trayling-slash. Therefor we must append it on the check.

PHPBB3-9930
2010-11-25 23:29:12 +01:00
Paul Sohier
5cdf27edef [ticket/9696] Surpress is_dir() notice when using SQLite with open_basedir.
PHPBB3-9696
2010-11-07 12:50:32 +01:00
rxu
880bace355 [ticket/9840] Display view unread posts link for guests.
Display view unread posts link for guests if applicable.

PHPBB3-9840
2010-10-16 20:46:38 +08:00
Igor Wiedler
9015e03d05 Merge branch 'ticket/bantu/9613' into develop-olympus
* ticket/bantu/9613:
  [ticket/9613] Slightly update language strings.
  [ticket/9613] Fix missing database part for unread posts search load switch.
  [ticket/9613] Implement a load switch for unread posts search feature.
2010-09-16 22:34:48 +02:00
Andreas Fischer
bef108a5cc [ticket/9609] Change header() calls setting HTTP status to send_status_line().
PHPBB3-9609
2010-09-11 22:01:31 +02:00
rxu
f1d5005797 [ticket/9613] Implement a load switch for unread posts search feature.
Since unread posts search can produce a high server load in certain
circumstances, we implement a switch for ACP "Load settings" to have an option
to disable this type of search.

PHPBB3-9613
2010-08-29 16:09:09 +02:00
Andreas Fischer
dfd3c4a5df Merge branch 'ticket/nickvergessen/9519' into develop-olympus
* ticket/nickvergessen/9519:
  [ticket/9519] Replace remaining is_writable() calls with phpbb_is_writable().
  [ticket/9519] Replace remaining is_writable() calls with phpbb_is_writable().
  [ticket/9519] Replace remaining is_writable() calls with phpbb_is_writable().
  [ticket/9519] Replace remaining is_writable() calls with phpbb_is_writable().
2010-08-28 23:25:05 +02:00
Joas Schilling
d533121741 [ticket/9780] Add length check back to gen_rand_string().
PHPBB3-9780
2010-08-20 20:11:36 +02:00
Josh Woody
f0aaecd6cc Merge branch 'ticket/bantu/9599' into develop-olympus
* ticket/bantu/9599:
  [ticket/9599] Reimplement phpbb_checkdnsrr() function.
  [ticket/9599] Adding tests for phpbb_checkdnsrr().
  [ticket/9599] Adding network function tests.
2010-08-19 10:53:10 -05:00
Josh Woody
25c579c00d Merge branch 'ticket/bantu/9612' into develop-olympus
* ticket/bantu/9612:
  [ticket/9612] Introduce new function gen_rand_string_friendly().
2010-08-19 09:11:36 -05:00
Joas Schilling
89b35f7ab9 [ticket/9519] Replace remaining is_writable() calls with phpbb_is_writable().
PHPBB3-9519
2010-08-13 17:10:35 +02:00
Chris Smith
013f0b62b8 [ticket/9771] Remove query string parameters that have no name.
PHPBB3-9771
2010-08-08 16:14:05 +01:00
Andreas Fischer
24e23755cf [ticket/9599] Reimplement phpbb_checkdnsrr() function.
Use gethostbyname(), checkdnsrr(), dns_get_record() or nslookup via exec().

PHPBB3-9599
2010-08-03 10:50:41 +02:00
Cullen Walsh
593e193bdc [ticket/9715] Better email regex
Using email regex created by James Watts and Francisco Jose Martin Moreno.
This passes many more tests for RFC valid emails.

PHPBB3-9715
2010-07-11 16:22:26 -07:00
Josh Woody
c40b2c7601 [ticket/9629] Allow style.php to retrieve its session ID from cookies
style.php takes a session ID to ensure it gets the right language for a user,
but that session ID is always passed in GET. This allows change allows the SID
to be read from the cookie, and theoretically makes it friendlier for caching
engines like Varnish.

PHPBB3-9629
2010-07-11 01:35:01 +02:00
Andreas Fischer
4eac7dca6d Merge branch 'ticket/rxu/9606' into develop-olympus
* ticket/rxu/9606:
  [ticket/9606] Optimize unread search option.
2010-06-17 19:10:59 +02:00
Oleg Pudeyev
c185e45e09 [ticket/7782] Return 404 HTTP status code for nonexistent attachments.
PHPBB3-7782
2010-05-17 14:14:53 -04:00
rxu
d819ee343a [ticket/9606] Optimize unread search option.
Get rid of redundant SQL query in search.php that should increase performance slightly.

PHPBB3-9606
2010-05-17 21:14:02 +08:00