Commit graph

20403 commits

Author SHA1 Message Date
Marc Alexander
d3d317a2de [feature/passwords] Correctly supply hash salt and settings to bcrypt
PHPBB3-11610
2013-09-14 13:51:44 +02:00
Marc Alexander
c9afda5a65 [feature/passwords] Use correct prefix for bcrypt type
PHPBB3-11610
2013-09-14 13:51:39 +02:00
Marc Alexander
7a526284d3 [feature/passwords] Default to bcrypt with $2y$ prefix if possible
PHPBB3-11610
2013-09-14 13:51:31 +02:00
Marc Alexander
78a8369173 [feature/passwords] Add basic bcrypt drivers for $2a$ & $2y$ prefix
The $2a$ prefix is the basic implementation with the $2y$ prefix extending
that class. However, the default hashes for phpBB should be generated with
$2y$ unless the PHP version is older than 5.3.7.

PHPBB3-11610
2013-09-14 13:51:24 +02:00
Marc Alexander
31d2a8ef05 [feature/passwords] Add salted md5 (phpBB3 default) and phpass drivers
The phpass driver extends the standard salted md5 driver of phpBB3. It will
only support the $P$ prefix that phpass uses.

PHPBB3-11610
2013-09-14 13:51:16 +02:00
Marc Alexander
4b6646d1be [feature/passwords] Add crypto driver base class and interface
PHPBB3-11610
2013-09-14 13:51:10 +02:00
Marc Alexander
fbdbf41dc8 [feature/passwords] Add helper functions, i.e. for combined hashes
Combined hashes can be used for i.e. converting already existing
password hashes to bcrypt. While this will not provide the same security
a pure bcrypt hash provides, it will still be significantly more secure
than a standard salted md5.
A combined hash will look as follows:
$H\2y${salted_for_H_prefix}${salt_+_settings_for_2y_prefix}${hash}
The prefixes are seperated by a backslash. Individual settings (which
can include either just the salt or a salt and possible additional settings)
are seperated by dollar signs. As backslashes and dollar signs are not
allowed in hashes or salts, they will be used for seperating the settings
from the salt.

Here is an example of a password hash:
$H\2a$9zv1uIaq1$10\1ff4640409fb96a449c1fO$/oN1O0cdUmFSMZT3UZKrgAyalhnt1LC

The 'H' prefix stands for the salted md5 implementation of phpBB 3.0.
Its settings will be parsed as 9zv1uIaq1 resulting in a hash for the check
as follows:
$H$9zv1uIaq1{hash}
Since the password is used for hashing, the {hash} can be left blank and
will basically be filled by the hashing algorithm. The {hash} will then be
used as password for the next hashing algorithm. In this case that would be
the bcrypt algorithm. The settings are set to 10\1ff4640409fb96a449c1fO which
will be transformed to 10$1ff4640409fb96a449c1fO resulting in a hash like
this for the bcrypt hashing function:
$2a$10$1ff4640409fb96a449c1fO{hash}
The {hash} will again be basically filled by the hashing algorithm.
Afterwards, the {hash} will be extracted from the returned hash and put at
the end of the already known hash settings:
$H\2a$9zv1uIaq1$10\1ff4640409fb96a449c1fO$

If the password is correct, the combined hash will of course be the same
as the stored one.

PHPBB3-11610
2013-09-14 13:50:56 +02:00
Marc Alexander
d66cae7cbc [feature/passwords] Add service collection file crypto.yml
This will contain definitions of the services and the service collection
that will be passed to the passwords manager.

PHPBB3-11610
2013-09-14 13:50:42 +02:00
Marc Alexander
3a0dd248d0 [feature/passwords] Add basic implementation of passwords manager
The passwords manager is capable of checking and hashing passwords.
It will support different hashing algorithms.

PHPBB3-11610
2013-09-14 13:50:07 +02:00
Vjacheslav Trushkin
d27bc857f3 [ticket/11795] Remove PM popup
PHPBB3-11795
2013-09-14 10:10:45 +03:00
Vjacheslav Trushkin
973f4bc887 [ticket/11795] Remove outdated comment from forum_fn.js
This comment is no longer relevant because function was rewritten

PHPBB3-11795
2013-09-14 10:10:44 +03:00
Vjacheslav Trushkin
e6d87c5bc0 [ticket/11795] Move find user JS to forum_fn
Move JavaScript from user search results to forum_fn.js

PHPBB3-11795
2013-09-14 10:10:44 +03:00
Vjacheslav Trushkin
0a9ba5415c [ticket/11795] Replace TWIG with phpBB syntax in ACP
PHPBB3-11795
2013-09-14 10:10:44 +03:00
Vjacheslav Trushkin
4b27ec441a [ticket/11795] Move MSN scripts to forum_fn.js
Move MSN scripts to forum_fn.js
Rewrite MSN scripts to remove duplicate code

PHPBB3-11795
2013-09-14 10:10:44 +03:00
Vjacheslav Trushkin
e4874c180a [ticket/11795] Use phpBB template syntax instead of TWIG
PHPBB3-11795
2013-09-14 10:10:44 +03:00
Vjacheslav Trushkin
22c8df5403 [ticket/11795] Move PM popup JS to forum_fn.js
Move PM popup JavaScript from overall_header to forum_fn.js
Use TWIG to escape PM popup URL

PHPBB3-11795
2013-09-14 10:10:43 +03:00
Vjacheslav Trushkin
4c2aad4ca9 [ticket/11795] Get rid of pagination JS variables
Move pagination variables to data attributes
Replace A_BASE_URL with BASE_URL and use TWIG to escape it

PHPBB3-11795
2013-09-14 10:10:43 +03:00
Vjacheslav Trushkin
253890520d [ticket/11795] Get rid of onload_functions
Get rid of onload_functions and onunload_functions
Scripts should use $(document).ready() instead

PHPBB-11795
2013-09-14 10:10:42 +03:00
Vjacheslav Trushkin
a92a3cfeb9 [ticket/11795] Use data-reset-on-edit attr to reset elements
Use data-reset-on-edit attribute to reset other inputs
when editing input with data.

Do not unbind event (old code unbound it after one use for
no reason)

PHPBB3-11795
2013-09-14 10:10:42 +03:00
Vjacheslav Trushkin
605cd0cafb [ticket/11795] Redo form elements auto-focus
Use data-focus attribute for forms to focus elements
when document is loaded instead of adding JavaScript

PHPBB3-11795
2013-09-14 10:10:42 +03:00
Nathan Guse
235e3f5595 Merge pull request #1710 from Hardolaf/ticket/11837
[ticket/11837] Translate UCP_AUTH_LINK_NOT_SUPPORTED
2013-09-13 15:18:38 -07:00
Nathan Guse
5909d05397 Merge branch 'develop-olympus' into develop
* develop-olympus:
2013-09-13 17:17:16 -05:00
Nathan Guse
38f315ed81 Merge remote-tracking branch 'remotes/cyberalien/ticket/develop-2/11811' into develop
* remotes/cyberalien/ticket/develop-2/11811:
  [ticket/11811] Remove outline on :focus
2013-09-13 17:16:58 -05:00
Nathan Guse
a5c532979d Merge remote-tracking branch 'remotes/cyberalien/ticket/11811' into develop-olympus
* remotes/cyberalien/ticket/11811:
  [ticket/11811] Remove outline on :focus
2013-09-13 17:16:20 -05:00
Vjacheslav Trushkin
f3bbca4fa0 Merge branch 'ticket/11811' into ticket/develop-2/11811
* ticket/11811:
  [ticket/11811] Remove outline on :focus

Conflicts:
	phpBB/adm/style/admin.css
	phpBB/styles/prosilver/theme/forms.css
2013-09-14 00:19:48 +03:00
Nathan Guse
b8bb16f8e7 Merge remote-tracking branch 'remotes/upstream/develop-olympus' into develop
* remotes/upstream/develop-olympus:
  [ticket/11831] getAttribute was replaced with attr
  [ticket/11831] Update fabpot/goutte to 1.0.*

Conflicts:
	phpBB/composer.lock
2013-09-13 15:56:28 -05:00
Nathan Guse
3918b228f7 Merge pull request #1713 from Hardolaf/ticket/11836
[ticket/11836] Fix subsilver version of the error
2013-09-13 13:41:10 -07:00
Vjacheslav Trushkin
3cd445d055 [ticket/11811] Remove outline on :focus
PHPBB3-11811
2013-09-13 23:41:07 +03:00
Joseph Warner
c8bd2288d1 [ticket/11836] Fix subsilver fatal error
PHPBB3-11836
2013-09-13 16:34:52 -04:00
Joseph Warner
3c6c1ec5f2 [ticket/11837] Replace escaped single quote with utf-8 single quote
PHPBB3-11837
2013-09-13 16:26:30 -04:00
Nathan Guse
033ae7edeb Merge pull request #1711 from Hardolaf/ticket/11836
[ticket/11836] Fix fatal error on unsupported provider for auth link
2013-09-13 12:39:39 -07:00
Nathan Guse
b4a374dc73 [ticket/11832] Fix INCLUDE(JS/CSS)
PHPBB3-11832
2013-09-13 10:58:03 -05:00
Joseph Warner
0737c4bd6d [ticket/11836] Fix fatal error on unsupported provider for auth link
PHPBB3-11836
2013-09-13 11:53:10 -04:00
Joseph Warner
b7ab068bbc [ticket/11837] Translate UCP_AUTH_LINK_NOT_SUPPORTED
PHPBB3-11837
2013-09-13 11:48:31 -04:00
Nathan Guse
e31082b82c Merge pull request #1675 from marc1706/ticket/11809
[ticket/11809] Ensure code.js is first script included after jQuery
2013-09-13 08:12:23 -07:00
Marc Alexander
1c1eecb376 [ticket/11809] Ensure code.js is first script included after jQuery
The file core.js sets up most of the AJAX and jQuery related framework for
phpBB. Due to this, it needs to be included before any other javascript file
in order to ensure that subsequent files can use the phpBB variables and
functions. Currently, it is however loaded with INCLUDEJS in overall_footer
which causes it to be loaded after every other javascript file except for the
style specific ajax.js. This causes every javascript file that is included
before core.js and is using the phpBB AJAX functions or variables to break.

PHPBB3-11809
2013-09-13 17:07:33 +02:00
Nathan Guse
21624e79fc [ticket/11832] Fix constructions of phpbb_filesystem
PHPBB3-11832
2013-09-13 10:04:35 -05:00
Nathan Guse
f8e665751a [ticket/11832] Fix smiley paths
PHPBB3-11832
2013-09-13 09:56:00 -05:00
Nathan Guse
8b2653dae3 Merge branch 'develop' of github.com:phpbb/phpbb3 into ticket/11832
# By David King
# Via David King (1) and Joas Schilling (1)
* 'develop' of github.com:phpbb/phpbb3:
  [ticket/11824] Fix comment wording
2013-09-13 09:52:50 -05:00
Nathan Guse
aa710df2db [ticket/11832] Create phpbb_symfony_request to handle initiating symfony_request
Now symfony_request is also a service (removed the function
phpbb_create_symfony_request).

Inject symfony request into filesystem

Cleanup for the tests

PHPBB3-11832
2013-09-13 09:52:02 -05:00
Joas Schilling
958f3e9503 Merge remote-tracking branch 'imkingdavid/ticket/11824' into develop 2013-09-13 16:48:28 +02:00
David King
ee44dff3be [ticket/11824] Fix comment wording
PHPBB3-11824
2013-09-13 07:28:00 -07:00
Nathan Guse
a194e6ce7a Merge branch 'develop' of github.com:phpbb/phpbb3 into ticket/11832
# By Nathan Guse (22) and others
# Via Nathan Guse (10) and others
* 'develop' of github.com:phpbb/phpbb3: (39 commits)
  [ticket/11843] Added newlines and included numbers in the DEFINE vars test
  [ticket/11843] Add checking DEFINE variables with underscores to template_test
  [ticket/11843] The twig lexer fixes DEFINE variables with underscores again
  [ticket/11727] Fix indentation
  [ticket/11727] Fix indentation
  [ticket/11745] Correct language, coding guidelines
  [ticket/11828] Fix greedy operators in lexer
  [ticket/11833] Prevent Twig errors from invalid template loops using BEGINELSE
  [ticket/11833] Fix bad template loop
  [ticket/11816] !$DOESNT_EXIST test
  [ticket/9550] Add the core.viewtopic_post_rowset_data event to viewtopic.php
  [ticket/11829] Use report_closed to determine status in MCP report_details
  [ticket/11816] Test !$DEFINITION
  [ticket/11822] Use namespace lookup order for asset loading
  [ticket/11727] Template loader support for safe directories to load files from
  [ticket/11816] Fix define/loop checks in IF statements containing parenthesis
  [ticket/11373] Use inheritdoc
  [ticket/11637] generate_text_for_display on search.php
  [ticket/11744] Cast to int
  [ticket/11744] Inheritdoc
  ...
2013-09-13 09:15:23 -05:00
Nathan Guse
16c6e43914 Merge pull request #1709 from rechosen/ticket/11843
[ticket/11843] Make the twig lexer fix DEFINE variables with underscores again
2013-09-13 06:43:40 -07:00
rechosen
658f6e2045 [ticket/11843] Added newlines and included numbers in the DEFINE vars test
Per suggestion of nickvergessen, I added newlines in the DEFINE variables with
underscores test. Now if the test fails, it's easier to spot which part is
failing. Also added a test for DEFINE variables containing numbers.

PHPBB3-11843
2013-09-13 13:53:39 +02:00
rechosen
45ecbae1ed [ticket/11843] Add checking DEFINE variables with underscores to template_test
To prevent the underscore in DEFINE variables from being forgotten again,
the template tests now test INCLUDEing a file based on the contents of a
DEFINE variable with underscores in it.

PHPBB3-11843
2013-09-13 12:27:07 +02:00
rechosen
42884546cc [ticket/11843] The twig lexer fixes DEFINE variables with underscores again
https://github.com/phpbb/phpbb3/pull/1708 accidentally stopped the twig lexer
from fixing DEFINE variables with underscores in them. This commit restores
that functionality.

PHPBB3-11843
2013-09-13 12:05:20 +02:00
David King
fc7a35be38 Merge pull request #1622 from EXreaction/ticket/11373
[ticket/11373] Prune old read notifications with cron
2013-09-12 22:01:11 -07:00
David King
5925ea1f45 Merge pull request #1689 from EXreaction/ticket/11727
[ticket/11727] Mark style directories safe to load from
2013-09-12 21:35:17 -07:00
Nathan Guse
f723491527 Merge branch 'develop' of github.com:phpbb/phpbb3 into ticket/11373
# By Joseph Warner (188) and others
# Via Andreas Fischer (41) and others
* 'develop' of github.com:phpbb/phpbb3: (435 commits)
  [ticket/11745] Correct language, coding guidelines
  [ticket/11828] Fix greedy operators in lexer
  [ticket/11835] Fix ucp_auth_link adding in migration
  [prep-release-3.0.12] Remove changelog entry for ticket that was not resolved.
  [ticket/develop/11832] Fix path detection
  [ticket/11833] Prevent Twig errors from invalid template loops using BEGINELSE
  [ticket/11833] Fix bad template loop
  [feature/oauth] Fix tabindex
  [ticket/11816] !$DOESNT_EXIST test
  [ticket/9550] Add the core.viewtopic_post_rowset_data event to viewtopic.php
  [ticket/11829] Use report_closed to determine status in MCP report_details
  [ticket/11825] Move schema_data.php into includes/ instead of phpbb/
  [ticket/11215] Remove unnecessary comment
  [ticket/11755] MySQL upgrader out of date
  [prep-release-3.0.12] Update Changelog for 3.0.12-RC3 release.
  [prep-release-3.0.12] Bumping version number for 3.0.12-RC3.
  [ticket/11823] Set up nginx server to match PHP files with characters after .php
  [ticket/11812] Fix empty define
  [ticket/11818] Update Symfony dependencies to 2.3.*
  [feature/oauth] Fix bug on ucp_auth_link related to error display
  ...
2013-09-12 23:34:34 -05:00