1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-13 10:22:42 +01:00
phorge-phorge/src/infrastructure/setup/__init__.php

24 lines
772 B
PHP
Raw Normal View History

<?php
/**
* This file is automatically generated. Lint this module to rebuild it.
* @generated
*/
phutil_require_module('phabricator', 'applications/base/storage/configuration');
phutil_require_module('phabricator', 'infrastructure/env');
phutil_require_module('phabricator', 'infrastructure/setup/sql');
phutil_require_module('phabricator', 'storage/connection/mysql');
phutil_require_module('phabricator', 'storage/queryfx');
phutil_require_module('phutil', 'filesystem');
phutil_require_module('phutil', 'filesystem/tempfile');
phutil_require_module('phutil', 'future/exec');
phutil_require_module('phutil', 'moduleutils');
Fix regenerate arcanist cert, setup stuff and avoid accept non valid image files as profile picture. Summary: Well, since I couldn't regenerate my arcanist cert I figured out that this wass because "workflows" are unavailable there now. I really can not figure out why but it was. I added in the setup script, the ability to check if is present the protocol of the host and if it has a trailing slash a the end of the line, since both are needed to generate the cert. Users now only be able to upload valid image files with mimetype of jpg, jpeg, png and gif. Test Plan: FIRST: DO NOT apply those changes! then 1- go to settings->arcanist certificate and the click on regenerate ... humm 2- On your config file, delete the trailing slash at the end and the protocol on "phabricator.base-uri", then go to setting->arcanist certificate. Here you will see something like this "phabricator.example.comapi\/" instead of "http:\/\/phabricator.example.com\/api\/". SECOND: Now apply this changes: 1- Go to settings->arcanist certificate and the click on regenerate. 2- On your config file, delete the trailing slash at the end and the protocol on "phabricator.base-uri", and setup "phabricator.setup" to true. 3- Then go to setting->arcanist certificate and you could see that this was successfully generated. THIRD: Go to settings->account and try to upload an invalid image file, and do the same on "youruserna"->edit profile. Reviewed By: epriestley Reviewers: epriestley jungejason CC: epriestley jugesason cadamo aran Differential Revision: 391
2011-06-03 04:27:10 +02:00
phutil_require_module('phutil', 'parser/uri');
phutil_require_module('phutil', 'utils');
phutil_require_source('PhabricatorSetup.php');