diff options
| author | Juuso Lapinlampi <wub@partyvan.eu> | 2015-10-09 22:37:37 +0200 |
|---|---|---|
| committer | Juuso Lapinlampi <wub@partyvan.eu> | 2015-10-09 22:37:37 +0200 |
| commit | 655c6aaeb9b7d74cc5a43fb0d719e896f0f0d11c (patch) | |
| tree | 00f9ee3c786667c9710dd4ae14d0543b0c2f1001 | |
| parent | 161042a1862f8e1991828970fc0d766efdf449c5 (diff) | |
Rewrite "Configuring" section to be more confident
The previous example can create a feeling of worry in the mind of the
reader. This will aim to fix that.
| -rw-r--r-- | README.md | 21 |
1 files changed, 12 insertions, 9 deletions
@@ -28,17 +28,20 @@ After this, the pomf site is now compressed and set up inside `dist/`. ## Configuring -The majority of settings are in `static/includes/settings.inc.php`. Read the -comments in that file for more information. +The majority of settings are in `static/includes/settings.inc.php`. -For file size configuration, there is no server-side verification: we assume -that PHP and Nginx provide ample protection in this department. There is, -however, client-side configuration for max size, the `data-max-size` attribute -on the file input in `pages/upload_form.swig`. +For file size configuration, open `Gruntfile.js` in an editor and modify the +`max_upload_size` value. The value is expressed in mebibytes (MiB). Run `grunt` +again to rebuild the pages for the changes to take effect. -Make sure to disable PHP from being executed on the file download -domain/directory (e.g., `a.pomf.example`), otherwise an attacker can upload a -malicious `.php` file and execute it on your server. +If you intend to allow uploading files larger than 2 MB, you may also need to +increase POST size limits in `php.ini` and webserver configuration. For PHP, +modify `upload_max_filesize` and `post_max_size` values. The configuration +option for nginx webserver is `client_max_body_size`. + +A best practice is to disable executing `.php` files on the `POMF_URL` domain +for uploaded files. This assures that a malicious user cannot execute arbitrary +PHP code on the server. ### Apache |
