Commit Graph

18470 Commits

Author SHA1 Message Date
Miguel Dantas
b669f57068 [CORE] Fixed common_get_preferred_php_upload_limit, because some values in php.ini can be -1 or 0 for unlimited 2019-08-03 17:31:40 +01:00
Miguel Dantas
ccebe536b3 [MEDIA] Removed blacklisted extensions, "trusts" upload extension (doesn't affect anything) and updated sysadmin documentation
Fixes bug which broke the UI. Oops
2019-08-03 17:31:39 +01:00
Miguel Dantas
b9a0733062 [MEDIA][CORE] Add common function for converting a string with a size unit to an int and MediaFile uses file_quota 2019-08-03 17:31:39 +01:00
Miguel Dantas
5961b45140 [MEDIA][UI] In case an attachment preview isn't possible, the name is displayed anyway 2019-08-03 17:31:39 +01:00
Miguel Dantas
5f53738376 [MEDIA][UI] Added preview support for BMP, WEBP and ICO, displaying the name underneath, centered 2019-08-03 17:31:38 +01:00
Miguel Dantas
5eb4a7d711 [MEDIA] File downloader now in PHP, added proper name in the UI and changed the format for new attachment file names
The file downloader was changed from a simple redirect to the file to one
implemented in PHP, which should make it safer, by making it possible disallow
direct access to the file, to prevent executing of atttachments

The filename has a new format:
  bin2hex("{$original_name}")."-{$filehash}"
This format should be respected. Notice the dash, which is important to distinguish it from the previous
format, which was "{$hash}.{$ext}"

This change was made to both make the experience more user friendly, by
providing a readable name for files, as opposed to it's hash. This name is taken
from the upload filename, but, clearly, as this wasn't done before, it's
impossible to have a proper name for older files, so those are displayed as
"untitled.{$ext}".

This new name is displayed in the UI, instead of the previous name.
2019-08-03 17:31:36 +01:00
Diogo Cordeiro
f717081893 [OEmbed] Revert filename change introduced with 96ce758c 2019-08-03 17:30:52 +01:00
Diogo Cordeiro
01b5118c6f [Oembed] Refactoring and some improvements (namely documentation)
Imported some changes from postActiv
2019-08-03 17:30:52 +01:00
Diogo Cordeiro
d705bcbd98 [CORE] Use random_bytes() if available and improve common_confirmation_code() randomness.
With PHP 7 comes the [random_bytes()](https://php.net/manual/en/function.random-bytes.php) and the [random_int()](https://www.php.net/manual/en/function.random-int.php) function which generates cryptographically secure pseudo-random bytes and integers, respectively.
2019-08-03 17:29:14 +01:00
Diogo Cordeiro
f0f5ecb756 [SCRIPTS] Fix sessiongc by XRevan86 2019-08-01 14:38:04 +01:00
Diogo Cordeiro
c0342b1482 [DOCUMENTATION] Allow install.php to be ran with sample nginx conf 2019-08-01 14:37:59 +01:00
Diogo Cordeiro
d1fc7c0774 [CORE] MySQL 5.5 support fully restored 2019-07-25 15:35:24 +01:00
Diogo Cordeiro
46be9b76ef [CORE] Fix wrong Profile_list schema and set created in user_im_prefs properly - by XRevan86
This reverts 496ab8c9, which was a bad correction of user_im_prefs values
2019-07-24 22:28:06 +01:00
Diogo Cordeiro
6c8d2e159e [DOCUMENTATION] Plugin events should be declared in the plugin's directory not in the core 2019-07-15 03:25:16 +01:00
Diogo Cordeiro
db9bb6b5a1 [OStatus] null being returned instead of an empty array
Fixes: "Invalid argument supplied for foreach" in onEndFindMentions
2019-07-10 00:34:46 +01:00
Diogo Cordeiro
5ea0d74a57 [UI] Long strings/words in dents weren't being wrapped 2019-07-10 00:33:19 +01:00
Diogo Cordeiro
30a1a460b7 Minor reformatting of upgrade.php, doesn't change functionality 2019-07-01 23:14:39 +01:00
Diogo Cordeiro
5eb61c17d4 Regression introduced in daa5f87f fixed by XRevan86
require_once(): Failed opening required 'Error.php' in extlib/DB/DataObject.php on line 562
2019-07-01 23:14:23 +01:00
Diogo Cordeiro
0a4eeb89da [CORE][ROUTER] Fix wrong parameter in all/:tag by XRevan86 2019-07-01 22:40:21 +01:00
Diogo Cordeiro
11dc170ead [CORE][FRAMEWORK] URL_REGEX_VALID_PATH_CHARS didn't recognize the parenthesis sign. 2019-06-26 15:54:51 +01:00
Diogo Cordeiro
98c0c1ed53 Implement $config['site']['logdebug'] 2019-06-25 22:59:10 +01:00
Diogo Cordeiro
83a05724b8 [CORE] Fix subscriptions and subscribers list (related to 44653d339d) 2019-06-24 14:06:43 +01:00
Diogo Cordeiro
44653d339d [Poll] Refactoring and minor bug fixes 2019-06-23 23:06:04 +01:00
Diogo Cordeiro
f2705180e0 [TagSub] Fix User's tags list issue
Issue introduced with 6d9f390b and 9a92b58057
2019-06-18 14:56:55 +01:00
Diogo Cordeiro
306d80de94 [DATABASE] Revert accidental regression introduced with 9a39ebe66f 2019-06-14 12:00:10 +01:00
Diogo Cordeiro
2740ff8c4c [DOCUMENTATION] Minor corrections
Add two missing contributors
Bumped patch due to changed introduced with 0583a6a904
2019-06-12 12:55:42 +01:00
Daniel Supernault
74ad4038ac Allow username or email in login form 2019-06-12 03:25:06 +01:00
Diogo Cordeiro
3f8593268e [Nodeinfo][TRANSLATION] Fix languages meta-data 2019-06-12 03:25:02 +01:00
Diogo Cordeiro
8ea83aac48 [OStatus] Wrong exception was being caught 2019-06-12 02:20:58 +01:00
Diogo Cordeiro
81d65afb28 [RELEASE] The Invicta Crusade 2019-06-11 18:37:25 +01:00
Diogo Cordeiro
c93547b080 [OpenID] Added support for GS's Internal Session Handler 2019-06-10 16:49:48 +01:00
Diogo Cordeiro
54f75683c7 [OpenID] s/sync/synch
This commit also fixes the translation in /plugins/OpenID/actions/finishopenidlogin.php#L203-L204 (s/Syncronize/Synchronize)
Sync is a bad technical jargon and we should use Synch instead.
Synch is already used in other parts of GNU social as seen in plugins/TwitterBridge/classes/Twitter_synch_status.php
2019-06-10 15:51:56 +01:00
Diogo Cordeiro
abfd691fda Merge branch 'nightly' of biodantas/gnu-social into nightly 2019-06-09 23:44:43 +00:00
Miguel Dantas
20c73f0596 [FORMATING] Ran php-cs-fixer on lib/mediafile.php, lib/imagefile.php and classes/File.php 2019-06-10 00:38:16 +01:00
Miguel Dantas
b224d93098 [MEDIA] ImageFile now extends MediaFile and validates images more aggressively.
Default supported files need to use consistent names. Bumped version to 1.20.0

ImageFile has been changed to extend MediaFile and rely on it to partially
validate files. This validation has been extended to not rely solely on
Fileinfo, as it is disabled on some places. Now it'll try to use the shell
command `file`, if Fileinfo isn't available.

ImageFile now converts every new upload to PNG, except JPEG and GIF, which
are kept, but still resized (to the same size), to remove possible scripts
embedded therein.

MediaFile::fromUpload will return an ImageFile if the uploaded file is an image
or a MediaFile otherwise.

MediaFile can be constructed with an id with value -1 to denote a temporary
object, which is not added to the DB. This is useful to create a temporary
object for representing images, so it can be used to rescale them.

The supported attachment array needs to be populated with the result of calling
`image_type_to_extension` for the appropriate image type, in the case of images.
This is important so all parts of the code see the same extension for each image
type (jpg vs jpeg).

Added documentation to classes/File.php and to lib/MediaFile and lib/ImageFile
2019-06-10 00:35:53 +01:00
Diogo Cordeiro
719bf065ca Merge branch 'nightly' of tenma/gnu-social into nightly 2019-06-09 17:16:01 +00:00
brunoccast
a1041a53f7 [THEME] Fix OpenID settings styles
- Action buttons are now side-by-side
- Dropped unused style rule concerning the solo-positioning of the Remove button
- Bump GS patch version
2019-06-09 18:13:04 +01:00
Diogo Cordeiro
711badb6b4 Merge branch 'openid-settings-sync' of tenma/gnu-social into nightly 2019-06-09 16:05:12 +00:00
brunoccast
1e4063254b [OpenID] Added synchronization button and corresponding action
UI:
- "Delete" area is now "Actions" area
- Updated themes to better reflect the changes

Routes:
- index.php?action=finishsyncopenid => finishsyncopenid

Translations:
- Updated OpenID translation files
- Updated OpenID POT file

Versioning:
- Bump OpenID minor version
- Bump GS patch version

Why would have labeling the Synchronize button of Sync been of bad taste? - answered by XRevan86:

In "synchronise" "ch" is a digraph meaning /k/ (actually /x/ turned into /k/ in English but whatever).
So… not separate letters.
It's like "ph" in "alphabet", or "sh" in "sheep", or "ch" in "chop" -- "ch" can mean a whole variety of sounds.
2019-06-09 17:04:26 +01:00
brunoccast
b8352e912f [THEME] Fix styles identation 2019-06-09 17:00:06 +01:00
brunoccast
69a1d77480 [OpenID] Add sync confirmation in both OpenID settings and login connection 2019-06-09 17:00:06 +01:00
Diogo Cordeiro
54d7a7cccd Merge branch 'fix-plugins-copyright' of tenma/gnu-social into nightly 2019-06-09 15:35:20 +00:00
brunoccast
c7afe2f86c [TRANSLATION] Update Plugin POs 2019-06-09 16:10:03 +01:00
Diogo Cordeiro
5f4e3fe0eb [TRANSLATION] Update POTs and normalize files 2019-06-08 18:41:10 +01:00
Miguel Dantas
fb95af1cf5 Added Spanish, Polish and Esperanto translations to NodeInfo plugin 2019-06-08 18:36:04 +01:00
brunoccast
7b73d267d5 [TRANSLATION] Update license and copyright notice in translation files 2019-06-08 18:36:04 +01:00
Diogo Cordeiro
08b6cfde66 [SESSION] Add backwards compatibility for third party plugins depending on old Session::cleanup()
Namely Qvitter
2019-06-08 00:31:32 +01:00
Diogo Cordeiro
2110c20ecc [DOCUMENTATION] README.md should mention about the importance of running upgrade.php script 2019-06-07 16:42:50 +01:00
Diogo Cordeiro
9f51692f26 [NGINX conf] Move /var/run to /run
As seen in https://lists.fedoraproject.org/pipermail/devel/2011-March/150031.html
Thanks to XRevan86 for reporting this :)
2019-06-07 15:02:10 +01:00
Diogo Cordeiro
02c67fd114 [Nodeinfo][DATABASE][Usage_stats] Fix wrong type for modified column 2019-06-07 15:02:10 +01:00