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

141 Commits

Author SHA1 Message Date
Andreas Fischer
82fff947c6 [ticket/10538] Call htmlspecialchars_decode() on Jabber and SMTP passwords.
PHPBB3-10538
2011-12-19 14:24:39 +01:00
Andreas Fischer
37c7668193 [ticket/10446] Pass $config and $user via parameter to anti_abuse_headers().
PHPBB3-10446
2011-11-20 16:35:31 +01:00
Andreas Fischer
a7077c9149 [ticket/10446] Remove leftover $headers parameter from anti_abuse_headers().
PHPBB3-10446
2011-11-20 14:02:22 +01:00
Oleg Pudeyev
c68973a9e0 [ticket/10446] RFC2047 encode user/server names in X-AntiAbuse headers.
PHPBB3-10446
2011-11-20 04:17:42 -05:00
Oleg Pudeyev
64d62038cd [ticket/10446] DRY X-AntiAbuse header addition.
PHPBB3-10446
2011-11-20 04:15:44 -05:00
Andreas Fischer
05515e0510 [ticket/10245] Use error_collector instead of ob_start() and ob_get_clean().
PHPBB3-10245
2011-09-18 22:04:34 +02:00
Andreas Fischer
6ff403c9f8 Merge branch 'ticket/cs278/9061' into develop-olympus
* ticket/cs278/9061:
  [ticket/9061] Simplify conditional statements by reworking the logic.
  [ticket/9061] Fixed a race condition in queue locking.
2010-10-27 13:06:21 +02:00
Chris Smith
9819700247 [ticket/9061] Simplify conditional statements by reworking the logic.
PHPBB3-9061
2010-10-27 11:31:42 +01:00
Oleg Pudeyev
01ef46a510 [ticket/9061] Fixed a race condition in queue locking.
Changed queue locking to cover all queue file operations,
in particular the check for queue file existince and
inclusion of queue file must be done under one lock.

Also refactored queue locking and unlocking into separate
methods.

PHPBB3-9061
2010-10-27 11:31:27 +01:00
Josh Woody
2f312b2175 [ticket/9559] Do not override queue package size in the case of an overflow
This reverts r8025 to includes/functions_messenger.php.  That code caused
problems on hosters with email limits less than package_size*2.5.  And it isn't
desirable in general to over-ride the admin's configuration options.

PHPBB3-9559
2010-07-22 10:44:31 -05:00
Nils Adermann
6e31ce8573 Do not store email templates in database. [Bug #54505]
To explain what this is about, first a short phpBB code history lesson: ;-)

r9823 originally introduced the usage of our template class for emails. The
messenger class uses set_custom_template() to initialise the template object
which neither disables storedb nor inheritance. These two values are set in
$user->theme rather than inside a particular template instance (quite a design
failure if I may add). Thus the html page that is displayed to the user also
determines these settings for the email templates. This obviously causes
problems because both emails and other custom templates can quite simply not
be stored in the database because the db table only stores the filename, not
the path and requires a template id.

r9839 then generally disabled storedb and template inheritance for custom
templates to fix Bug #40515. This works for custom templates, but not for
emails where lots of template objects are created. In such a situation the
last call to set(_custom)_template() would now determine the values of storedb
and inheritance in _tpl_load. So any page sending emails would neither load
its template from the database nor use template inheritance. The same revision
also introduced orig_tpl_* variables in set_template() which on their own are
very much pointless, but could allow resetting the storedb and inheritance
values if they were used to reset $user->theme just before template execution
in _tpl_load.

In r10150 these orig_tpl_* variables are correctly used to access information
about the template of the page being displayed - contrary to the last template
used - from within the bbcode, fixing Bug #51285. However r10150 also introduces
a pointless $template_mode parameter for set_custom_template(). $template_mode
is really just a boolean flag (value you can be 'template' or an arbitrary other
value) that if it set circumvents the unsetting of storedb and template
inheritance. The very code that had been added to prevent issues with emails and
custom templates. Fixing the problem introduced by r8839 but at the same time
reintroducing the much greater problem from the original implementation of email
templates.

And now an explanation of what I did:

Based on this I have now changed the set_custom_template method to always
disable storedb. It can now properly use inheritance, you simply tell it the
path where the parent template can be found, by default the path is false which
will turn inheritance off. To make this work the template class now always
overwrites $user->theme storedb and inheritance variabbles with orig_tpl_* just
before rendering a template in _tpl_load. This way they are guaranteed to always
contain the value they had at the time set_template/set_custom_template were
called. This fixes [Bug #54505].

In summary, using global state is simply a horrible idea in object oriented
programming. Always Pass values, that an object depends on, as parameters - never
through magic global variables. Following this principle will safe you from a lot
of headaches.

Please test this patch as much as possible to make sure templates still work
properly for you, focus on multiple languages, missing language files, and
custom templates in systems that make use of the template class outside of
phpBB itself.


git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10460 89ea8834-ac86-4346-8a33-228a782c2dd0
2010-01-26 16:52:46 +00:00
Josh Woody
b4d6b1e980 Further fixes for r10447 and r10448. Correctly account for custom language directories (caught by naderman)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10449 89ea8834-ac86-4346-8a33-228a782c2dd0
2010-01-26 04:11:58 +00:00
Josh Woody
a314b2807f Remove needless check (revising r10447)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10448 89ea8834-ac86-4346-8a33-228a782c2dd0
2010-01-26 03:43:02 +00:00
Josh Woody
ff1aa876b5 Fall back to board default language email template if the file does not exist user's preferred language (#35595)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10447 89ea8834-ac86-4346-8a33-228a782c2dd0
2010-01-26 03:30:43 +00:00
Meik Sievertsen
782d680b54 Fix getting host for situations where the name/IP is not resolvable. Related to Bug #41025
Related revisions: r9387 and r10158

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10178 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-22 15:09:09 +00:00
Meik Sievertsen
223b9ed0d6 extend r9387 - check for existance of all functions we use...
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10158 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-17 13:39:50 +00:00
Joas Schilling
697fd5a134 Fix #51285 and more issues with template inherence on set_custom_template
Conflict introduced with r9839 and r9823

Authorised by: AcydBurn

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10150 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-09-16 08:11:52 +00:00
Meik Sievertsen
19bae65f4c Fix possible wrong encodings in email template files in messenger. Related to bug #46725
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10052 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-08-25 09:04:38 +00:00
Meik Sievertsen
92a1775294 we will use the non-compliant way for mail() until we further inspected PHP's source.
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10015 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-08-18 13:24:45 +00:00
Meik Sievertsen
9bcc38ea0b Fix email problems on servers with PHP installations not accepting RFC-compliant subject string passed to the the mail()-function. (Bug #46725)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10014 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-08-18 09:59:24 +00:00
Chris Smith
20bf778b93 Per RFC2047 section 5 do not use quoted strings for encoded recipient names
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10011 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-08-18 01:43:51 +00:00
Meik Sievertsen
be963ed938 allow custom template path for email files
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9957 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-08-11 16:24:18 +00:00
Meik Sievertsen
cef8c2d87e Parse email text files with the template engine.
Did not check if this influences styles template cache list/purge/etc.

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9823 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-07-22 09:07:24 +00:00
Chris Smith
05548f8f05 Correctly split UTF-8 encoded strings when using mail(). #45815
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9530 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-06-03 16:29:26 +00:00
Meik Sievertsen
b8b578cd99 Messenger now also able to use a custom language path. (Bug #36545)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9450 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-04-17 09:08:34 +00:00
Meik Sievertsen
0a139376ab fix revision #r9430 - all hail the math!
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9449 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-04-16 15:39:29 +00:00
Meik Sievertsen
d7a8d7ad09 Correctly split long subject lines according to the used RFC. This fixes extra spaces within long subjects. (Bug #43715)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9430 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-04-10 07:54:52 +00:00
Meik Sievertsen
2155bbbf8a Erm, yes, we use EOL in queue too. :/ (me is ashamed). Paul, thanks for giving me access to debug this.
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9429 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-04-08 18:08:54 +00:00
Meik Sievertsen
abc458bc2a make sure eol is set (if PHP_EOL is empty? :o)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9427 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-04-08 16:40:39 +00:00
Meik Sievertsen
1e36ed1f74 Mass Email works again for users with empty jabber address but notification set to 'both'. (Bug #39755)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9389 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-03-17 15:50:19 +00:00
Meik Sievertsen
a80f7a5ea1 Use FQDN for SMTP EHLO/HELO command. (Bug #41025)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9387 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-03-17 15:23:57 +00:00
Meik Sievertsen
61135f65b9 Use OS-specific line endings for mail headers. (related to Bug #42755)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9364 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-03-11 16:23:12 +00:00
Meik Sievertsen
d9468c35da add IN_PHPBB check to generated cache files
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9363 89ea8834-ac86-4346-8a33-228a782c2dd0
2009-03-11 12:53:54 +00:00
Chris Smith
a94ed97992 Missing read permission from calls to phpbb_chmod()
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9208 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-12-19 20:36:18 +00:00
Meik Sievertsen
c831a3edce Do not try to send jabber notifications if no jid entered (Bug #36775)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9078 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-11-22 19:55:00 +00:00
Meik Sievertsen
876b193180 some whitespace changes and opening files in binary mode in functions_messenger
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8971 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-10-06 05:50:16 +00:00
Meik Sievertsen
1f01089e2f Use phpBB 3.1.x method for storing cached data to prevent PHP bug with our usage of var_export(). (Thanks to Techie Micheal and HoL for pointing out possible problems)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8955 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-09-29 15:58:42 +00:00
Meik Sievertsen
6c763cd8b6 change the way we do chmodd'ing. I know, my implementation really sucked... good we have motivated community members who point this out. ;) Thanks to faw for providing a way better function and for discussing and also abiding to our needs. :) LEW21 should maybe credited too... he gave the inspiration without knowing it.
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8780 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-08-22 12:52:48 +00:00
Meik Sievertsen
068096531f the chmod change i already had within the changelog (by mistake). This should further secure writable directories and created files.
Installation need to be tested on different hosts.

git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8763 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-08-16 19:06:18 +00:00
Meik Sievertsen
337f1c33c9 Do not error out if php_uname function disabled / Authenticating on SMTP Server (Bug #22235 - patch by HoL)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8449 89ea8834-ac86-4346-8a33-228a782c2dd0
2008-03-18 14:32:49 +00:00
Meik Sievertsen
e2e56acca9 some further fixes
- re-introduce grabbing random number from /dev/urandom


git-svn-id: file:///svn/phpbb/trunk@8241 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-11-17 20:04:49 +00:00
Meik Sievertsen
fe57a7983b fixing tiny bugs
git-svn-id: file:///svn/phpbb/trunk@8232 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-11-10 16:19:24 +00:00
Meik Sievertsen
e6c79242e6 dumdidum... sorry. ;)
git-svn-id: file:///svn/phpbb/trunk@8146 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-10-05 14:30:11 +00:00
Meik Sievertsen
09f6cf11dd - correct jabber token handling
- undisclosed-recipients:; instead of undisclosed-recipient:;
- PM details button should not be there


git-svn-id: file:///svn/phpbb/trunk@8090 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-09-14 14:06:23 +00:00
Meik Sievertsen
cda8083ba7 fixing some bugs
git-svn-id: file:///svn/phpbb/trunk@8075 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-09-02 17:24:56 +00:00
Meik Sievertsen
c9dcf849b9 - two new packages... diff and utf
- only 60 chars for topic title if new post (please see changelog for explanation)
- change utf8_wordwrap (had some bugs david and nils spotted - was not really functional, sorry for this. :D)


git-svn-id: file:///svn/phpbb/trunk@8034 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-08-16 11:28:58 +00:00
Meik Sievertsen
2bbd2fb1f9 some bugs fixed
git-svn-id: file:///svn/phpbb/trunk@8033 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-08-15 17:32:48 +00:00
Meik Sievertsen
e9188d4e05 Some changes... non-invasive...
git-svn-id: file:///svn/phpbb/trunk@8025 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-08-13 12:14:07 +00:00
Meik Sievertsen
75a5162945 again, a lot of bug fixes
git-svn-id: file:///svn/phpbb/trunk@7909 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-07-19 20:38:38 +00:00
Meik Sievertsen
b883ff119f let's see if i can break something. :o
git-svn-id: file:///svn/phpbb/trunk@7830 89ea8834-ac86-4346-8a33-228a782c2dd0
2007-07-03 15:36:18 +00:00