gnu-social/classes
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
..
Attention.php Nothing interesting was made in this commit. 2016-03-01 16:30:00 +01:00
Avatar.php Use another method of detecting unspecified defaultImage size 2016-03-01 15:00:52 +01:00
Config.php varchar to text since there's no reason to limit the fields 2015-12-27 11:50:11 +01:00
Confirm_address.php EmailRegistration plugin flow requires a confirmation address before user creation 2019-06-07 15:02:09 +01:00
Consumer.php utf8mb4 conversion on database with index adjusts 2015-02-12 18:18:55 +01:00
Conversation.php Fixed the parsing of ostatus:conversation etc. 2017-05-02 18:58:22 +02:00
File_redirection.php I like to throw exceptions instead of using if statements. 2017-05-02 09:07:39 +02:00
File_thumbnail.php file_quota for OembedPlugin too 2016-07-21 03:19:05 +02:00
File_to_post.php File-related functions not declared static 2015-06-07 10:01:28 +02:00
File.php [MEDIA] ImageFile now extends MediaFile and validates images more aggressively. 2019-06-10 00:35:53 +01:00
Foreign_link.php Added proper enabling and disabling of sending RTs to Twitter. 2016-03-21 07:12:52 -07:00
Foreign_service.php utf8mb4 conversion on database with index adjusts 2015-02-12 18:18:55 +01:00
Foreign_subscription.php staticGet for sub-Managed_DataObject classes now calls parent 2013-08-12 19:46:44 +02:00
Foreign_user.php TwitterBridge is closer to working again 2015-07-17 21:03:37 +02:00
Group_alias.php Local_group and User are now assumed to be in same namespace 2013-10-17 01:27:01 +02:00
Group_block.php Minor typing stuff and syntax fixes 2013-11-02 17:28:11 +01:00
Group_inbox.php pkeyGet is now static and more similar to getKV 2013-08-18 15:42:51 +02:00
Group_join_queue.php Fix group-join request rejections 2015-12-04 16:11:15 +00:00
Group_member.php Some code aligning for consistency 2015-10-10 22:09:51 +02:00
GS_DataObject.php DB_DataObject delete function calls PEAR::isError directly, ignore E_STRICT 2015-06-06 20:01:03 +02:00
Invitation.php utf8mb4 conversion on database with index adjusts 2015-02-12 18:18:55 +01:00
Local_group.php Introducing TargetedRss10Action for simplifying RSS 1.0 2015-07-10 00:28:36 +02:00
Location_namespace.php utf8mb4 conversion on database with index adjusts 2015-02-12 18:18:55 +01:00
Login_token.php Replace common_good_random with common_random_hexstr 2013-10-21 13:20:30 +02:00
Managed_DataObject.php getByUri shorthand function for Managed_DataObject (with uri) 2016-06-25 11:52:17 +02:00
Memcached_DataObject.php Not really necessary in practice but makes better queries 2016-03-23 17:51:13 +01:00
Nonce.php utf8mb4 conversion on database with index adjusts 2015-02-12 18:18:55 +01:00
Notice_location.php Oops, forgot Notice_location PHP file 2015-09-04 22:30:33 +02:00
Notice_prefs.php Notice_prefs now available (I just copied Profile_prefs) 2017-05-06 14:38:47 +02:00
Notice_source.php utf8mb4 conversion on database with index adjusts 2015-02-12 18:18:55 +01:00
Notice_tag.php Consistent behaviour for ScopingNoticeStream $scoped 2016-03-01 14:51:47 +01:00
Notice.php Fix broken user activitystreams feed due to deleted notices 2019-05-06 23:27:38 +01:00
Oauth_application_user.php utf8mb4 conversion on database with index adjusts 2015-02-12 18:18:55 +01:00
Oauth_application.php Add default icon to OAuth apps 2015-09-05 17:02:17 -04:00
Oauth_token_association.php utf8mb4 conversion on database with index adjusts 2015-02-12 18:18:55 +01:00
Old_school_prefs.php Updating all Memcached_DataObject extended classes to Managed_DataObject 2013-08-18 12:32:32 +02:00
Profile_block.php Declaring some more static functions properly 2013-09-09 23:28:20 +02:00
Profile_list.php Database fields with timestamp type now allow CURRENT_TIMESTAMP to be set as default value 2018-08-25 14:07:52 +01:00
Profile_prefs.php Profile_prefs::getAll fix prefs loop 2015-12-17 14:58:06 +00:00
Profile_role.php pkeyGet is now static and more similar to getKV 2013-08-18 15:42:51 +02:00
Profile_tag_subscription.php function delete in dataobjects now don't break strict syntax 2013-10-29 10:20:57 +01:00
Profile_tag.php ProfilesettingsAction and related stuff modernised 2015-07-17 12:20:11 +02:00
Profile.php Fix negative one subscriptions by XRevan86 2019-04-26 01:10:53 +01:00
Queue_item.php s/LOG_ERROR/LOG_ERR/ 2015-12-31 13:04:50 +01:00
Related_group.php staticGet for sub-Managed_DataObject classes now calls parent 2013-08-12 19:46:44 +02:00
Remember_me.php staticGet for sub-Managed_DataObject classes now calls parent 2013-08-12 19:46:44 +02:00
Reply.php Consistent behaviour for ScopingNoticeStream $scoped 2016-03-01 14:51:47 +01:00
Safe_DataObject.php DB_DataObject recommends using ->tableName() 2015-06-06 19:35:10 +02:00
Schema_version.php staticGet for sub-Managed_DataObject classes now calls parent 2013-08-12 19:46:44 +02:00
Session.php [SESSION] Add backwards compatibility for third party plugins depending on old Session::cleanup() 2019-06-08 00:31:32 +01:00
Sms_carrier.php utf8mb4 conversion on database with index adjusts 2015-02-12 18:18:55 +01:00
Status_network_tag.php DB_DataObject recommends using ->tableName() 2015-06-06 19:35:10 +02:00
status_network.ini oops. really embarassing typo (that explains some weird behaviour) 2010-07-29 16:32:41 -04:00
Status_network.php utf8mb4 conversion on database with index adjusts 2015-02-12 18:18:55 +01:00
Subscription_queue.php define Subscription_queue::exists as static 2015-07-11 00:08:23 +02:00
Subscription.php If a user has a private stream, assume a moderated subscription policy 2016-01-03 19:33:26 +01:00
Token.php utf8mb4 conversion on database with index adjusts 2015-02-12 18:18:55 +01:00
Unavailable_status_network.php Updating all Memcached_DataObject extended classes to Managed_DataObject 2013-08-18 12:32:32 +02:00
User_group.php Consistent behaviour for ScopingNoticeStream $scoped 2016-03-01 14:51:47 +01:00
User_im_prefs.php User_im_prefs - Fix wrong schemaDef 2019-04-19 20:54:24 +01:00
User_location_prefs.php staticGet for sub-Managed_DataObject classes now calls parent 2013-08-12 19:46:44 +02:00
User_urlshortener_prefs.php Fixed CHMOD + set error_reporting(0) in getvaliddaemons.php to avoid strict warnings in PHP +5.5 2014-08-24 13:12:44 +02:00
User_username.php utf8mb4 conversion on database with index adjusts 2015-02-12 18:18:55 +01:00
User.php ActivityGenerationTests.php fails but doesn't crash anymore. 2016-08-14 11:55:49 +05:30