Skip to content
This repository has been archived by the owner on Mar 3, 2020. It is now read-only.

Merge /dev to /master #542

Merged
merged 19 commits into from Aug 5, 2017
Merged

Merge /dev to /master #542

merged 19 commits into from Aug 5, 2017

Conversation

justinwray
Copy link
Contributor

Merge of dev into master

Commits:

javuto and others added 16 commits February 6, 2017 00:15
* Password types in admin

* Fully functional password complexity enforcement for registration

* lowercase word in text

* Adding test for password types regex and fixing all errors for hh_client

* Updating outdated schema for tests
* Custom branding for icon and text

* Replace async calls branding xhp by attributes

* Use genRenderBranding in genRenderMobilePage and combine awaitables
* add hindi translation

* added hindi translation

* Update lang_hi.php

* Error Checking During Build Tests (#452)

* Error Checking During Build Tests

* Execute hh_client during build tests.

* Currently the PHP built-in getimagesizefromstring function is not in the HHVM upstream hhi, and therefore generates an error.  In the future, once getimagesizefromstring is added upstream, we should use the hh_client exit status.

* * Readded execute permissions to the script.

* HHVM/Hack Typing Error Fixes (#450)

* HHVM/Hack Typing Error Fixes

* Fixed a few HHVM/Hack typing and strict compliance issues.

* This is necessary before hh_client can run and be enforced during the build process. (See comments on #435)

* * Updated formatting.

* Require bxslider version 4.2.6 (Fixes #455) (#458)

* This resolves a current build error #455.

* bxslider was updated from 4.2.6 to 4.2.7 on February 14th.  Previously FBCTF allowed for a near match to 4.2.6.  However, FBCTF fails to build with 4.2.7.  During the installation, process grunt failed to build the browserify javascript.

* Fixed Syntax Errors in Hindi Language (Fixes Build Errors) (#460)

* Fixed minor syntax error due to character encoding.

* This will ensure the project builds (no Hack errors).

* Automated Game Start and Stop (#449)

* Automated Game Start and Stop

* Games will automatically start and stop at their scheduled times.  Administrators can still manually start or stop a game regardless of the configured schedule.

* Both Control::genAutoBegin() and Control::genAutoEnd() were added to check the current time against the scheduled start or stop time and perform the relevant action (Control::genBegin or Control::getEnd).

* Control::genAutoRun() checks the current game status and determine if the game should be starting or ending, calling the appropriate function (Control::genAutoBegin or Control::getAutoEnd) and is exclusively used in the new autorun.php script.

* Control::genRunAutoRunScript() runs the new autorun.php script, ensuring the script is not already running before starting a new copy.

* The Router class was updated to include a call to Control::genRunAutoRunScript(), this ensures the script is always running.  This script status check, and execution when needed, only takes place on a full page load.

* The autorun.php script runs Control::genAutoRun() and sleeps up to 30 seconds.

* If the game is scheduled to start or stop within 30 seconds, the script will sleep for the necessary amount of time.

* Games will always start with at most a 29-second difference from the scheduled time.  This discrepancy can only take place if the schedule is changed within 30 seconds of the previously scheduled time.  Otherwise, the execution will happen at the scheduled time.

* This automation is self-contained and requires no additional dependencies or external services (like cron, etc.).

* * Allow administrators to define the cycle time (in seconds) for the autorun process.  This time will be used for the sliding sleep.

* * Added sanitization to the autorun script path/file.

* Attachments and Links Import/Export, Database Restore, and Control Cleanup (#451)

* Attachments and Links Import/Export, Database Restore, and Control Cleanup

* Attachments can now be exported and imported.  On export, attachments are downloaded into a Tar Gzip and securely extracted on import.

* Links and Attachments data is now provided within the Levels export.  Users must import both the Level data and the Attachment files to restore the levels with attachments.

* A database restore option has been added which utilizes the backed up database content.  This overwrites all data in the database.

* The Control page has been reorganized to align the various functionality better.

* Memcached flushing has been added to all relevant data imports.

* Error handling has been added to the various import functions.

* * Removed getter function for the Attachment constant.

* Switched double quotes with single quotes.

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Live Sync API (#459)

* Live Sync API

* Introducing the Live Sync API.

* The Live Sync API allows administrators to import game activity in near-real-time.  Users can link their accounts on one or more FBCTF platform instances and their scores will be automatically imported into the systems that have been linked.

* The primary use-case revolves around event aggregation across multiple FBCTF instances.  Event organizers can now separate FBCTF instances and combine scores into one global scoreboard.

* The Live Sync API will import Levels, Categories, Scoring Events, and Hint Usage.  Scores are automatically calculated, and bonuses are updated to ensure accurate scoring across linked FBCTF instances.

* Administrators determine which systems, if any, are linked.

* Users must link their account in order for their activity to be synced.

* The UI/UX of FBCTF has been updated to include a mechanism for users to configure their Live Sync credentials.

* Users cannot obtain hints or capture levels on the importing system.

* The API is JSON based and the schema is generalized so that it can leveraged by other platforms or external processes.  So data can be synced from non-FBCTF platforms.

* The importing script will automatically handle country conflicts (if two systems have the same country selected for a level).

* USER GUIDE (Documentation):

  * Users must first have an account on all FBCTF instances they wish to link.

  * The user must then login and access the game board.

  * From the navigation menu, the user should select "Account."

  * The user must then set a Live Sync username and password.  The Live Sync username and password must not be their login credentials.  In fact, users are prohibited from using their account password as their Live Sync password.

  * The user would repeat the above steps for each FBCTF instance they wish to link.  The Live Sync credentials must be the same on each FBCTF instance or their accounts will not be linked.

* ADMIN GUIDE (Documentation):

  * The admin is free to sync as many platforms as their desire.  Additionally the admin may import from as many API sources as their desire.

  * The admin will need to launch the "live import" script, on any importing systems, from the command-line:

    * `hhvm -vRepo.Central.Path=/var/run/hhvm/.hhvm.hhbc_liveimport /var/www/fbctf/src/scripts/liveimport.php <Space Delimited URLs to API Endpoints> <Sleep Between Cycles> <Disable SSL Certificate Verification> <Show Debug Messages>`

    * Disabling of the SSL Verification and Debugging are both optional.  The URL(s) and Sleep time are required arguments.

    * EXAMPLE:  `hhvm -vRepo.Central.Path=/var/run/hhvm/.hhvm.hhbc_liveimport /var/www/fbctf/src/scripts/liveimport.php "https://10.10.10.101/data/livesync.php https://10.10.10.102/data/livesync.php https://10.10.10.103/other/platform/api" 300 true true`

* API SCHEMA (JSON):

  * JSON:

[{"active":true,"type":"flag","title":"Example Level 1","description":"This is the first example level.","entity_iso_code":"TJ","category":"None","points":100,"bonus":30,"bonus_dec":10,"penalty":10,"teams":{"fbctf:user1:$2y$12$a1T4KyqqxADi3YIJ7M2sf.VoSHz6qMBx.zrxAIvZnD8de95EsLeny":{"timestamp":"2017-02-17 02:20:22","capture":true,"hint":false}}}]

  * Explained (Formatted output for readability - the actually data must be in valid JSON format):

    [0] => Array
        (
            [active] => 1						// Level Status (Enabled/Disabled)
            [type] => flag						// Level Type (Flag or Quiz)
            [title] => Example Level 1				// Level Name
            [description] => This is the first example level.	// Level Description
            [entity_iso_code] => US					// Country Code (Mapping)
            [category] => None						// Level Category
            [points] => 100						// Points
            [bonus] => 30						// Bonus Points
            [bonus_dec] => 10						// Bonus Point Decrement
            [penalty] => 0						// Hint Cost
            [teams] => Array
                (
                    [fbctf:user3:$2y$12$GIR7V0Q2OMDv8cTTOnzKVpGYgR4.pWTsPRHtZ3yenKZ9JxOabx4m2] => Array	// Live Sync Type, Live Sync Username, Live Sync Key (Hash)
                        (
                            [timestamp] => 2017-02-17 01:09:24						// Activity Timestamp
                            [capture] => 1									// Capture Status
                            [hint] => 									// Hint Used
                        )

                )

        )

  * Example (Formatted output for readability - the actually data must be in valid JSON format):

Array
(
    [0] => Array
        (
            [active] => 1
            [type] => flag
            [title] => Example Level 1
            [description] => This is the first example level.
            [entity_iso_code] => US
            [category] => None
            [points] => 100
            [bonus] => 30
            [bonus_dec] => 10
            [penalty] => 0
            [teams] => Array
                (
                )

        )

    [1] => Array
        (
            [active] => 1
            [type] => flag
            [title] => Example Level 2
            [description] => This is the second example level.
            [entity_iso_code] => OM
            [category] => None
            [points] => 100
            [bonus] => 30
            [bonus_dec] => 10
            [penalty] => 0
            [teams] => Array
                (
                    [fbctf:user1:$2y$12$n.VmlNNwxmZ/OkGGuhVhFeX0VExAgjoaYzyetLCIemSXN/yxWXLyO] => Array
                        (
                            [timestamp] => 2017-02-17 01:01:49
                            [capture] => 1
                            [hint] => 1
                        )

                    [fbctf:user2:$2y$12$GIDv8cR7V0nzKVpQ2OMTTOGYgR4.pWTxOPRH9abtsJZ3yenKZx4m2] => Array
                        (
                            [timestamp] => 2017-02-17 01:21:13
                            [capture] => 1
                            [hint] => 1
                        )

                )

        )

    [2] => Array
        (
            [active] => 1
            [type] => flag
            [title] => Example Level 3
            [description] => This is the third example level.
            [entity_iso_code] => MA
            [category] => None
            [points] => 100
            [bonus] => 30
            [bonus_dec] => 10
            [penalty] => 0
            [teams] => Array
                (
                    [fbctf:user2:$2y$12$GIDv8cR7VpQ2OM0nzKVTTOGYgR4.pWTxOabtsPRH9JZ3yenKZx4m2] => Array
                        (
                            [timestamp] => 2017-02-17 01:18:45
                            [capture] => 1
                            [hint] =>
                        )

                    [fbctf:user1:$2y$12$n.VmlNNwxmZ/OkGGuhVhFeXYzExAg0VoajyetLCIemSXN/yxWXLyO] => Array
                        (
                            [timestamp] => 2017-02-17 01:01:41
                            [capture] => 1
                            [hint] =>
                        )

                )

        )

    [3] => Array
        (
            [active] => 1
            [type] => flag
            [title] => Example Level 4
            [description] => This is the second example level.
            [entity_iso_code] => RO
            [category] => None
            [points] => 100
            [bonus] => 30
            [bonus_dec] => 10
            [penalty] => 0
            [teams] => Array
                (
                    [fbctf:user3:$2y$12$GIDv8cR7V02OnzKVpQMTTOGYgR4.pWTsPOabtZRH9Jx3yenKZx4m2] => Array
                        (
                            [timestamp] => 2017-02-17 01:09:24
                            [capture] => 1
                            [hint] =>
                        )

                )

        )

)

* TO DO (Enhancements):

  * Implemented alternative Live Sync key/authentication mechanisms, such as: Facebook Login, OAuth, etc.

  * Improve the processing of Bases/Progressive scoring.

  * Integrate password strength enforcement for the Live Sync credentials.

* * Added unit tests for Live Sync to TeamTest

* * Updated unit tests for the Live Sync API.

* Added Google OAuth to Live Sync API

* Google OAuth can now be used with the Live Sync when the exporting system provides the "google_oauth" type and provides the email address of the user in base64 encoded form.

* Added Google OAuth UI/UX.  If enabled, this allows a user to link their Google account to their FBCTF account using Google OAuth.  The user simply navigates to the account page and clicks the "Link Your Google Account" button and completes the sign-in/authorization process.

* Administrators must enable Google OAuth.  When disabled the option does not appear for the users.  To enable Google OAuth the administrator must first create a Google API account and then place the API secrets file on the system (in a non-web directory).  The administrator would then set the full path to the API secrets file in the settings.ini file, within the GOOGLE_OAUTH_FILE field.

* The Live Sync API has been updated to handle the "google_oauth" type case.

* The liveimport.php script has been updated to set default values for some of the API fields.  The following fields are mandatory:

  * title

  * description

  * points

  * teams

* The live import code has also been updated to ensure duplicate levels, when using a combination of non-defined and defined countries, are not generated.

* The project now requires google/apiclient ^2.0 from composer.  Updated composer.json and composer.lock to define the new dependencies.

* Minor formatting updates.

* * Ensure mandatory fields are set, gracefully skip when they are not.

* Refined Live Import CLI Options and Updated Google OAuth Data

* The live sync import script (livesync.php) now utilizes `getopts()` to provide more user-friendly option input to the command-line script.  The script will provide a help message upon usage without the required field(s).  Here is the help message text:

```
Usage:
  hhvm -vRepo.Central.Path=/var/run/hhvm/.hhvm.hhbc_liveimport /var/www/fbctf/src/scripts/liveimport.php
    --url <Sync URL> [Switched allowed multiple times.  Optionally provide custom HTTP headers after URL, pipe delimited]
    --sleep <Time to Sleep Between Cycles> [Default: 300]
    --disable-ssl-verification [Optional: Disables SSL Certification Verification]
    --debug [Optional: Enables Debug Output]
```

* Custom HTTP Headers are now supported via the `url` CLI argument, using a pipe (`|`) delimiter.  Multiple headers may be provided by the user.

* Users of the live sync import script (livesync.php) must provide at minimum the `url` argument.  Multiple URLs are allowed in order to import from more than one host.  Additionally, users may specify custom HTTP headers as necessary per-URL.

* The `sleep`, `disable-ssl-verification`, and `debug` arguments are optional.  By default the script will sleep for 300 seconds between imports; this may be changed with the `sleep` option.  By default the script will enforce SSL security and verification, however there are times when this may need to be disabled.  SSL Verification can be disabled with the `disable-ssl-verification` option.  The `debug` option provides a detailed output of the scripts activity; unless `debug` is used, the script will provide no output unless an error is encountered.

* Here are some example usages of the liveimport.php script:

  * Single URL, 30 second cycles:

`hhvm -vRepo.Central.Path=/var/run/hhvm/.hhvm.hhbc_liveimport /var/www/fbctf/src/scripts/liveimport.php --url "https://10.10.10.101/data/livesync.php" --sleep 30`

  * Multiple URLs, 90 second cycles, Disable SSL Verification:

`hhvm -vRepo.Central.Path=/var/run/hhvm/.hhvm.hhbc_liveimport /var/www/fbctf/src/scripts/liveimport.php --disable-ssl-verification --url "https://10.10.10.101/data/livesync.php" --url "https://10.10.10.103/data/livesync.php" --sleep 90`

  * Multiple URLs, One Custom HTTP Header, Debug Enabled:

`hhvm -vRepo.Central.Path=/var/run/hhvm/.hhvm.hhbc_liveimport /var/www/fbctf/src/scripts/liveimport.php --debug --url "https://10.10.10.101/data/livesync.php" --url "https://10.10.10.102/data/livesync.php|X-API-KEY: f4f0d2154f338fd8edb38fc3839f22dd"`

* The live sync import script (livesync.php) now performs XSSI filtering on the returned JSON and logs an error message if the JSON data is missing or malformed.

* Inverse conditions within the live sync import script (livesync.php) have been reformatted to provide clearer readability.

* The Google OAuth Live Sync key has been switched from the user's email address to their Google Profile ID.  This value does not need to be encoded.

* Minor Updates

* Added a specific redirect URL for the Google OAuth process.  This will ensure the user is redirected back to the same (sub)domain they came from.  This is primarily useful if the FBCTF instance is accessible from multiple domains or subdomains (like www).  The redirect URL must still be authorized in the Google API settings/console.

* Added a date/time output for the debug mode of the live import script.

* Set the modal title to a static value.

* I think its bad (#446)

* Fix fail error

* Order by name in category list

The category filter in gameboard aren't ordered alphabetically

* Autofocus in team name

* Fail

* Fix Fail autofocus

* Fix error with autofocus

* Not very good

For security reasons, I think it's not very good insert the admin id by default at session table

* Update SessionTest.php

* Updated LiveSync Security (#494)

* Updated LiveSync Security

* Live Sync API is now disabled by default.

* Admins can enable or disable the Live Sync API from the Administration Configuration page.

* Live Sync API now has an optional 'Auth Key.'  When the auth key is set, anyone attempting to pull from the API must supply the auth key value in their request.  Without the auth key, no data is provided by the Live Sync API endpoint.

* When using the Auth Key, it must be added as a parameter to the URL value in the `liveimport` script: ```?auth=XXXXX_```

  * Example (with an auth key of `1234567890`:

  * `hhvm -vRepo.Central.Path=/var/run/hhvm/.hhvm.hhbc_liveimport /var/www/fbctf/src/scripts/liveimport.php --url 'https://10.10.10.101/data/livesync.php?auth=1234567890'`

  * Note:  When using the Auth Key you should use a secure key.

* The `livesync` API endpoint will provide error messages if the API is disabled, the key is missing or invalid, or if any general error is encountered.

* The `liveimport` script will check for errors and display those in the output if any are encountered.

* Updated LiveSync Security

* Combined Awaitables throughout LiveSync endpoint.

* Used hash_equals() for API key verification, mitigating timing attacks on the key.# Please enter the commit message for your changes. Lines starting

* Temp fix for issue 499 & 500.  Forcing Grunt to continue as it is not correctly detecting node_modules in the folder (#502)

* Merge Deconflict of /dev and /master (#503)

* Registration enforcing strong passwords (#442)

* Password types in admin

* Fully functional password complexity enforcement for registration

* lowercase word in text

* Adding test for password types regex and fixing all errors for hh_client

* Updating outdated schema for tests

* Custom branding for icon and text (#448)

* Custom branding for icon and text

* Replace async calls branding xhp by attributes

* Use genRenderBranding in genRenderMobilePage and combine awaitables
* All languages have been updated to include missing translations.

* Primarily this will declutter the error log, making debugging far easier.
* Dynamically generate activity log and store in the database. Activity log table stores the object type and identifier, so the log is up to date even if some portion of the object has changed (i.e., name).

* Optionally, allow for game related activites to be automatically announced through the announcements area.

* Added table "activity_log" to database.

* Added column "auto_announce" into database configuration table.

* Added auto announcement toggle in admin panel.

* Added auto announcement and activity logging for:
  * Game Start, Pause, Resume, and End
  * Levels being Added, Updated, Enabled, Disabled

* Added activity logging for levels being captured.

* Added ActivityLog class:
  * genCaptureLog() - Stores level capture event in activity log
  * genCreateGameActionLog() - Stores a change to the game state
  * genAdminLog() - Stores administrative action
  * genCreateGenericLog() - Stores generic messages
  * genCreate() - Manually create activity log entry

* Invalidated memcached for relevant level actions.

* Cleanly exit the ActivityLog class if a user session doesn't exist.

* Fixed a variable name mismatch in the Level class.

* The Auto Announcement feature, now call from numerous administrative methods, requires the "game" and "auto_announce" configuration values.  Both configuration values have been added to the seed data.

* The configuration test asserts have been updated to match the new record counts.

* The testSetStatus() test case to use the second (undeleted) level.
* Added backward compatibility to the Level import process for exported files prior to PR #451

* Levels exported after PR #451 contain Links and Attachments, however prior to PR #451 they did not.  The import code will now import levels even if the import file doesn't contain Links or Attachments.
* Renamed "Game Controls" to "Announcement Controls" on the administrative Announcement page.
* Before a game begins, or before any scores are captured, the Memcached is empty for multiple scoring values. This results in continual hits to the database.

* Scores are now cached at zero until the first capture is obtained.   This dramatically reduces the number of queries performed and the load on the server.
* Functionality prevents users from utilizing the same logo as another user/team or one already in use.

* Users now are provided the option of selecting a unique, or unused logo.

* When a logo is selected the logo is marked as used.

* When a logo is removed from a team (through team deletion, logo change, or otherwise) the logo is readded to the rotation for available logos.

* When a team is imported their logo is set to used.

* Database schema changed to set the default for all logos to unused. The scheme update also sets the admin logo to used.
* Added "Custom Organization," editable within the administrative interface. The organization will display as the system name (i.e., "Custom CTF") in all relevant locations including the page titles.

* Custom Text has been renamed to "Custom Byline."

* The custom organization value will also be used for the welcome message on the landing page.

* Database updated to support the new customization options.
* If `settings.ini` exists it will now be copied to `settings.ini.bak` during the testing process (/extra/run_tests.sh).

* After the tests complete, if the backup file exists it will restore the file.
* Maintain Team Protection on Database Reset

* Database resets, through Admin Control, will maintain protection on protected admin accounts.

* Added Team::genSetProtected() to set protection status on a team.

* Database reset now calls Team::genSetProtected() on previous protected accounts.

* The Database reset process has been optimized to improve performance.

* Fixed Permissions
* Login form JavaScript now properly retrieves and renders errors when invalid login credentials are provided.

* Added teamLoginFormError() distinguished from teamNameFormError() and teamTokenFormError().

* Updated teamPasswordFormError() to read the login AJAX response and call the appropriate error function.

* This PR fixes the bug identified in Issue #521.
* Level Deletion Confirmation and Bug Fixes

* Added deletion confirmation dialog when deleting levels.

* Level data is now deleted from HintLog, ScoresLog, and FailuresLog, when a level is deleted.

* Cache invalidation performed on level deletion for records containing levels.

* Moved all awaitable queries into a vector which are now executed via AsyncMysqlConnection::multiQuery().
…port (#535)

* Separate docker containers per service

* Provision Streamlined, Quick Setup Added, and Multiple Containers Support

* The project now includes a number of "Quick Setup" options to ease the installation or startup process of the platform.  The following Quick Setup modes are available:

  *  Direct Installation - Used when directly installing to the system you are on; this is useful when installing on bare metal, an existing VM, or a cloud-based host.

      * `source ./extra/lib.sh`
      * `quick_setup install <dev/prod>`

  * Multi-Server Direct Installation - Used when directly installing the platform with each service on a separate system; this is useful when installing on bare metal systems, existing VMs, or cloud-based hosts.

    * Database Server (MySQL)
      * `source ./extra/lib.sh`
      * `quick_setup install_multi_mysql <dev/prod>`

    * Cache Server (Memcached)
      * `source ./extra/lib.sh`
      * `quick_setup install_multi_nginx <dev/prod>`

    * HHVM Server (HHVM)
      * `source ./extra/lib.sh`
      * `quick_setup install_multi_hhvm <dev/prod> <IP of MySQL Server> <IP of Memcached Server>`

    * Web Server (Nginx)
      * `source ./extra/lib.sh`
      * `quick_setup install_multi_nginx <dev/prod> <IP of HHVM Server>`

  * Standard Docker Startup - Used when running FBCTF as a single docker container.
      * `source ./extra/lib.sh`
      * `quick_setup start_docker <dev/prod>`

  * Multi-Container Docker Startup - Used when running FBCTF on docker with each service hosted in a separate docker container.
      * `source ./extra/lib.sh`
      * `quick_setup start_docker_multi <dev/prod>`

  * Standard Vagrant Startup - Used when running FBCTF as a single vagrant container.
      * `source ./extra/lib.sh`
      * `quick_setup start_docker <dev/prod>`

  * Multi-Container Vagrant Startup - Used when running FBCTF on vagrant with each service hosted in a separate vagrant container.
      * `source ./extra/lib.sh`
      * `quick_setup start_docker_multi <dev/prod>`

* Each installation platform now supports both Production Mode (prod) and Development Mode (dev).

* The `provision.sh` script has been streamlined and organized based on the services being installed.  The installation process now also includes more logging and error handling.  Common and core functionally has been migrated to `lib.sh` where appropriate.  Color coding has been added to the various output to make quick visual monitoring of the process easier.

* Package installation, specifically the check for existing packages has been updated to fix an issue where packages would sometimes not be installed if a similarly named package was already present on the system.

* The `provision.sh` script now supports separate installations for each service using the `--multiple-servers` and `--server-type` options.

* HHVM configuration has been updated to run HHVM as a network-service.

* Nginx configuration is now included in the platform code base and utilized.

* Docker service startup scripts are included for each of the services:
  * `./extra/mysql/mysql_startup.sh`
  * `./extra/hhvm/hhvm_startup.sh`
  * `./extra/nginx/nginx_startup.sh`

* This PR fixes the docker installation dependencies issue #534.

* This PR includes docker-compose configurations for multi-docker containers, fixing issue #440.

* Services on Docker (both single container and multi-container) are now monitored to ensure they do not fail.

* This PR updates HHVM to the latest stable version for Ubuntu 14.04, HHVM Version 3.18.1, fixing issue #496.

* Attachment/Upload permissions have been corrected across the installation environments.  This fixes issues with improper permissions on Docker and Vagrant while still enforcing secure file permissions.  This should resolve issues like #280 going forward.

* Implemented more strict permissions on he CTF PATH (755 verses 777).

* Fixed long-standing, upstream induced, HHVM socket permission issues (like #229), mostly experienced in Docker or after a restart (resulting in a _502 Bad Gateway_):  facebook/hhvm#6336.  Note that this fix is a temporary workaround until the upstream issue is resolved.

* With the introduction of the latest available version of HHVM and the inclusion of multiple-server support, performance increases should be noticeable.  This should help alleviate issues like #456.

* This PR was derived, in part, from PR #530.

* Added Memcached Service Restart to container service script

* Added logging of PHP/HHVM version to provision script.

* Added logging of PHP Alternatives to provision script.

* Composer is now installed with the HHVM binary instead of PHP.

* Composer Install is run with the HHVM binary instead of PHP.

* The Travis trusty Ubuntu image has been downgraded from `sugilite` to `connie`.

* Updated run_tests.sh to have write permissions to settings.ini

* Set run_tests.sh to use localhost for DB and MC.

* HHVM 3.18+ enforces \HH\FormatString - Invariant calls now are of \HH\FormatString type - All `invariant()` calls that are passing in a variable argument have been updated to use literal strings for the format string.  Invariant passes the second (and subsequent) arguments to `sprintf()`.  The second parameter of `invariant()` must be a literal string, containing placeholders when needed.  More information can be found here:  hhvm/user-documentation#448.  This change ensures the code is strict compliant in HHVM versions 3.18
Conflicts:
	README.md
	database/schema.sql
	database/test_schema.sql
	extra/run_tests.sh
	extra/settings.ini.example
	src/controllers/AdminController.php
	src/controllers/Controller.php
	src/language/lang_es.php
	src/language/lang_hi.php
	src/models/Level.php
	src/models/ScoreLog.php
	src/static/js/index.js
@justinwray justinwray merged commit 3047351 into facebookarchive:master Aug 5, 2017
justinwray added a commit that referenced this pull request Aug 5, 2017
Merged `master` onto `dev`

Commits:

* add hindi translation (f9f69a7)
* added hindi translation (c5a3eb2)
* Update lang_hi.php (6bf8317)
* Merge pull request #454 from Akhil09/master (f19b5d5)
* Error Checking During Build Tests (#452) (de72b28)
* HHVM/Hack Typing Error Fixes (#450) (8e4151e)
* Require bxslider version 4.2.6 (Fixes #455) (#458) (c2957d7)
* Fixed Syntax Errors in Hindi Language (Fixes Build Errors) (#460) (899ab2b)
* Automated Game Start and Stop (#449) (ca40091)
* Attachments and Links Import/Export, Database Restore, and Control Cleanup (#451)(be35c6b)
* Update README.md (8d1db8c)
* Update README.md (8f16141)
* Update README.md (53a6fa7)
* Update README.md (300091c)
* Live Sync API (#459) (0b7ca09)
* I think its bad (#446) (d326564)
* Updated LiveSync Security (#494) (e880251)
* Temp fix for issue 499 & 500. Forcing Grunt to continue as it is not correctly detecting node_modules in the folder (#502) (dd3c874)
* Merge Deconflict of /dev and /master (#503) (51e06a7)
* Added Slack registration link to README (b11322e)
* Merge branch 'dev' into WraySec/fbctf/merge@7f8c281
* Fixed conflict in ScoreLog (e181da2)
* Fixed conflict in ScoreLog (dd9de6e)
* Fixed conflict in Control (f7c6439)
* Merge /dev/ to /master (#542) (3047351)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants