Commit Graph

114 Commits

Author SHA1 Message Date
Michal Čihař
2ed64c3c6a Merge branch 'master' into master-security 2016-10-24 13:55:39 +02:00
Michal Čihař
75a5fde46d Use secure.php.net for PHP documentation links
This avoids unnecessary redirect on the way (I still think this website
setup is weird, but that's all I can do about it).

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-10-18 11:13:24 +02:00
Michal Čihař
d753aaaa9b Merge branch 'master' into master-security 2016-10-04 17:25:00 +02:00
Michal Čihař
fc5bb4a278 Merge branch 'QA_4_6' 2016-10-03 19:38:40 +02:00
Deven Bansod
96eba72fa6 Fix #12327: Show as PHP No longer works
Fix output of show_as_php. Don't show the links that are not required
or that may not work as expected

Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
2016-09-27 13:47:31 +05:30
Michal Čihař
f143245f62 Use builtin pow for calculations
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-09-27 10:05:33 +02:00
Michal Čihař
0060c36ac9 Remove usage of Util::pow with forcing builtin pow
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-09-27 10:04:55 +02:00
Michal Čihař
41c4855575 Remove no longer used Util::pow and tests for it
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-09-27 09:34:32 +02:00
Deven Bansod
7fe62ef22e Remove extra space
Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
2016-09-26 21:48:58 +05:30
Michal Čihař
6f8edef792 Merge branch 'master' into master-security 2016-09-26 13:47:05 +02:00
Michal Čihař
86128d63f6 Merge branch 'QA_4_6' 2016-09-26 13:41:05 +02:00
Michal Čihař
d956922a61 Remove duplicate code in SQL escaping
Fixes #12508

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-09-26 13:40:04 +02:00
Michal Čihař
19c24a8c6c Merge branch 'master' into master-security 2016-09-16 10:30:28 +02:00
Michal Čihař
3546bed47e Avoid using mb_strlen for checking whether string is empty
Using strlen produces same results here, just way faster.

Fixes #12397

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-09-16 10:29:21 +02:00
Michal Čihař
809a75eb92 Merge branch 'master' into master-security 2016-09-16 09:49:28 +02:00
Volkan Ulukut
7ce0234a2c Using number_format parameters instead of Util::localizeNumber
Signed-off-by: Volkan Ulukut <arthan@gmail.com>
2016-09-07 11:42:09 +03:00
Michal Čihař
9ffbb90ec0 Merge branch 'master' into master-security 2016-09-02 16:25:40 +02:00
Michal Čihař
abbce3ad3d Merge branch 'QA_4_6' 2016-09-02 16:25:17 +02:00
Michal Čihař
e803caed71 Use single quotes in PHP code
Fixes #12405

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-09-02 16:23:21 +02:00
Michal Čihař
c3328c743a Silent errors when getting remote file
- both curl and fopen wrappers can emmit errors in cases where remote
  site is not accessible

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-09-02 13:47:08 +02:00
Michal Čihař
2148df85f1 Merge branch 'QA_4_6' 2016-08-30 15:53:06 +02:00
Michal Čihař
f3ca367efa Fix number formatting with different settings of precision in PHP
- fixed Util::formatNumber to avoid rounding issues to mess up display
- force precision = 14 to ensure we get sane behavior

With precision set to higher value many things do not behave as expected
producing strange numbers in various places.

For example with precision=19 you get:

php > echo round(1.2, 2);
1.199999999999999956

Fixes #12303

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-30 15:51:18 +02:00
Michal Čihař
3e90d32b72 Merge branch 'QA_4_6' 2016-08-30 14:09:07 +02:00
Michal Čihař
d24dd24b75 Ensure unlim_num_rows is numberic
Fixes #12516

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-30 14:08:47 +02:00
Michal Čihař
4b1288a564 Correctly handle errors at client side
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-29 12:35:22 +02:00
Michal Čihař
f3869cefd1 Split backends for URL request for easier testing
Issue #12465

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-29 11:38:58 +02:00
Michal Čihař
47a0b7edd5 Hardcode connection timeout settings
We anyway used almost same value in all places.

While doing this change, I've also increased the timeout.

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-29 11:35:52 +02:00
Michal Čihař
d343315245 Set User-Agent directly
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-29 11:29:50 +02:00
Michal Čihař
5ecc194ebf Fix headers handling
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-29 11:27:12 +02:00
Michal Čihař
5a8666c36a Fix allow_url_fopen request handling
Issue #12465

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-29 11:22:45 +02:00
Michal Čihař
438244650e Consistent coding style
Issue #12465

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-29 11:22:43 +02:00
Michal Čihař
a7755dbb64 Merge pull request #12465 from Seldar/master
Fixes #12380 Refactored http requests into one function "httpRequest" in Util.php
2016-08-29 11:08:12 +02:00
Volkan Ulukut
be6944d0eb
Fixes #12380 Refactored http requests into one function "httpRequest" in Util.php
Signed-off-by: Volkan Ulukut <arthan@gmail.com>
2016-08-29 00:20:38 +03:00
Michal Čihař
46b329c32b Merge branch 'QA_4_6' 2016-08-18 17:37:34 +02:00
Michal Čihař
6faa1fe46a Add rel="noopener noreferrer" to all external target="_blank" links
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-08-18 17:35:20 +02:00
Michal Čihař
aebbb31aad Merge branch 'master' into master-security 2016-07-29 14:08:23 +02:00
Michal Čihař
1221b5ea4a Merge branch 'QA_4_6' into QA_4_6-security 2016-07-29 14:05:48 +02:00
Michal Čihař
108b71c3f6 Merge branch 'QA_4_6' 2016-07-29 14:04:46 +02:00
Michal Čihař
b27020f108 Avoid typecasting to float when not needed
Fixes #12303

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-07-29 14:03:13 +02:00
Michal Čihař
6f75f8a261 Merge branch 'QA_4_6-security' into master-security 2016-07-09 09:14:12 +02:00
Michal Čihař
5491d67fb5 Avoid possible path traversal using MySQL username
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-30 10:05:46 +02:00
Michal Čihař
791bdafcdd Merge branch 'QA_4_6-security' into master-security 2016-06-17 16:24:39 +02:00
Michal Čihař
1363ce5749 Merge branch 'QA_4_6' into QA_4_6-security 2016-06-17 14:27:02 +02:00
Michal Čihař
e531526bc5 Merge branch 'QA_4_6' 2016-06-17 13:22:06 +02:00
Michal Čihař
58da975117 Add missing URL encoding
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-17 13:22:01 +02:00
Michal Čihař
170c045507 Simplify code for processing SQL query to display
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-17 13:21:01 +02:00
Michal Čihař
84507dfeb6 Merge branch 'QA_4_6' 2016-06-17 13:10:28 +02:00
Michal Čihař
a5950f9ecd Fix link to mariadb explain analyzer
- avoid double urlencoding of the query
- properly escape html entities

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-17 13:05:11 +02:00
Michal Čihař
ef1493d9b4 Move request conversion to generic code
Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-17 09:35:57 +02:00
Michal Čihař
9869a95641 Simplify Message adding methods
The methods are now called based on added type:

- addHtml adds HTML code as is
- addText adds text after escaping it
- addMessage adds Message instance

Signed-off-by: Michal Čihař <michal@cihar.com>
2016-06-16 15:23:45 +02:00