Kaynağa Gözat

Added custom to default alias format options

Will Browning 4 yıl önce
ebeveyn
işleme
eaed93a2d0

+ 31 - 16
SELF-HOSTING.md

@@ -617,13 +617,17 @@ DROP PROCEDURE IF EXISTS `check_access`$$
 
 CREATE DEFINER=`anonaddy`@`localhost` PROCEDURE `check_access`(alias_email VARCHAR(254) charset utf8)
 BEGIN
-    DECLARE alias_action varchar(7) charset utf8;
     DECLARE no_alias_exists int(1);
+    DECLARE alias_action varchar(7) charset utf8;
+    DECLARE username_action varchar(7) charset utf8;
+    DECLARE additional_username_action varchar(7) charset utf8;
+    DECLARE domain_action varchar(7) charset utf8;
     DECLARE alias_domain varchar(254) charset utf8;
+
     SET alias_domain = SUBSTRING_INDEX(alias_email, '@', -1);
 
     # We only want to carry out the checks if it is a full RCPT TO address without any + extension
-    IF LOCATE('@',alias_email) > 1 AND LOCATE('+',alias_email) = 0 AND LENGTH(alias_domain) > 0 THEN
+    IF LOCATE('+',alias_email) = 0 THEN
 
         SET no_alias_exists = CASE WHEN NOT EXISTS(SELECT NULL FROM aliases WHERE email = alias_email) THEN 1 ELSE 0 END;
 
@@ -638,7 +642,7 @@ BEGIN
             WHERE
                 email = alias_email
                 AND (active = 0
-                OR deleted_at IS NOT NULL) LIMIT 1);
+                OR deleted_at IS NOT NULL));
         END IF;
 
         # If the alias is deactivated or deleted then increment its blocked count and return the alias_action
@@ -648,8 +652,7 @@ BEGIN
             SET
                 emails_blocked = emails_blocked + 1
             WHERE
-                email = alias_email
-            LIMIT 1;
+                email = alias_email;
 
             SELECT alias_action;
         ELSE
@@ -664,7 +667,7 @@ BEGIN
             FROM
                 users
             WHERE
-                alias_domain IN ( CONCAT(username, '.example.com')) ) AS users,
+                alias_domain IN ( CONCAT(username, '.example.com')) ),
             (
             SELECT
                 CASE
@@ -676,7 +679,7 @@ BEGIN
             FROM
                 additional_usernames
             WHERE
-                alias_domain IN ( CONCAT(username, '.example.com')) ) AS usernames,
+                alias_domain IN ( CONCAT(username, '.example.com')) ),
             (
             SELECT
                 CASE
@@ -688,10 +691,21 @@ BEGIN
             FROM
                 domains
             WHERE
-                domain = alias_domain) AS domains
-            LIMIT 1;
+                domain = alias_domain) INTO username_action, additional_username_action, domain_action;
+
+            # If all actions are NULL then we can return 'DUNNO' which will prevent Postfix from trying substrings of the alias
+            IF username_action IS NULL AND additional_username_action IS NULL AND domain_action IS NULL THEN
+                SELECT 'DUNNO';
+            ELSEIF username_action IN('DISCARD','REJECT') THEN
+                SELECT username_action;
+            ELSEIF additional_username_action IN('DISCARD','REJECT') THEN
+                SELECT additional_username_action;
+            ELSE
+                SELECT domain_action;
+            END IF;
         END IF;
     ELSE
+        # This means the alias must have a + extension so we will ignore it
         SELECT NULL;
     END IF;
  END$$
@@ -708,27 +722,27 @@ IN (CONCAT(username, '.example.com'),CONCAT(username, '.example2.com'))
 You may be wondering why we have this line near the top of the procedure:
 
 ```sql
-IF LOCATE('@',alias_email) > 1 AND LOCATE('+',alias_email) = 0 AND LENGTH(alias_domain) > 0 THEN
+IF LOCATE('+',alias_email) = 0 THEN
 ```
 
-The reason this is present is because Postfix will pass multiple arguments to this stored procedure for each incoming email.
+This is present because Postfix will pass multiple arguments (substrings of the alias) to this stored procedure for each incoming email.
 
 From the Postfix docs for [check_recipient_access](http://www.postfix.org/postconf.5.html#check_recipient_access):
 
 > "Search the specified access(5) database for the resolved RCPT TO address, domain, parent domains, or localpart@, and execute the corresponding action."
 
-What this means is that if an email comes in for the alias - hello+extension@username.example.com then Postfix will run the stored procedure with the following arguements:
+What this means is that if an email comes in for the alias - hello+extension@username.example.com then Postfix will run the stored procedure with the following arguments and order:
 
 ```sql
 CALL check_access('hello+extension@username.example.com');
-CALL check_access('hello@username.example.com');
+CALL check_access('hello@username.example.com'); # We want it to stop the checks here which is why we return 'DUNNO'
 CALL check_access('username.example.com');
 CALL check_access('example.com');
 CALL check_access('com');
 CALL check_access('hello@');
 ```
 
-We only want the queries to be run for the RCPT TO address (hello@username.example.com) without any + extension, which is what the check above does. It also prevents needless database queries being run.
+We only want the queries to be run for the RCPT TO address (hello@username.example.com) without any + extension, which is what the check above does. It also prevents needless database queries being run by returning 'DUNNO' when it finds a match.
 
 Update the permissions and the group of these files:
 
@@ -787,7 +801,7 @@ At the time of writing this I'm using the latest LTS - v12.19.0
 
 ```bash
 cd /var/www/anonaddy
-composer install --prefer-dist --no-scripts --no-dev -o && npm install
+composer install --prefer-dist --no-dev -o && npm install
 npm run production
 ```
 
@@ -1041,8 +1055,9 @@ In order to update you can run the following commands:
 ```bash
 git pull origin master
 
-composer update
+composer install --prefer-dist --no-dev -o
 npm update
+npm run production
 php artisan migrate
 
 php artisan config:cache

+ 1 - 1
app/Http/Requests/UpdateDefaultAliasFormatRequest.php

@@ -27,7 +27,7 @@ class UpdateDefaultAliasFormatRequest extends FormRequest
             'format' => [
                 'required',
                 'string',
-                'in:uuid,random_words'
+                'in:uuid,random_words,custom'
             ]
         ];
     }

+ 1 - 1
composer.json

@@ -63,7 +63,7 @@
         "post-autoload-dump": [
             "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
             "@php artisan package:discover --ansi",
-            "@php artisan version:absorb"
+            "@php artisan version:absorb --ansi"
         ],
         "post-root-package-install": [
             "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""

+ 50 - 51
composer.lock

@@ -396,16 +396,16 @@
         },
         {
             "name": "doctrine/dbal",
-            "version": "2.11.1",
+            "version": "2.11.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/doctrine/dbal.git",
-                "reference": "6e6903cd5e3a5be60a79439e3ee8fe126f78fe86"
+                "reference": "fb5d5f2f26babf8dce217b1eb88300c22bb703a4"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/doctrine/dbal/zipball/6e6903cd5e3a5be60a79439e3ee8fe126f78fe86",
-                "reference": "6e6903cd5e3a5be60a79439e3ee8fe126f78fe86",
+                "url": "https://api.github.com/repos/doctrine/dbal/zipball/fb5d5f2f26babf8dce217b1eb88300c22bb703a4",
+                "reference": "fb5d5f2f26babf8dce217b1eb88300c22bb703a4",
                 "shasum": ""
             },
             "require": {
@@ -417,12 +417,11 @@
             "require-dev": {
                 "doctrine/coding-standard": "^8.1",
                 "jetbrains/phpstorm-stubs": "^2019.1",
-                "nikic/php-parser": "^4.4",
                 "phpstan/phpstan": "^0.12.40",
-                "phpunit/phpunit": "^9.3",
+                "phpunit/phpunit": "^9.4",
                 "psalm/plugin-phpunit": "^0.10.0",
                 "symfony/console": "^2.0.5|^3.0|^4.0|^5.0",
-                "vimeo/psalm": "^3.14.2"
+                "vimeo/psalm": "^3.17.2"
             },
             "suggest": {
                 "symfony/console": "For helpful console commands such as SQL execution and import of files."
@@ -500,7 +499,7 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2020-09-27T04:09:41+00:00"
+            "time": "2020-10-20T14:36:48+00:00"
         },
         {
             "name": "doctrine/event-manager",
@@ -1402,30 +1401,30 @@
         },
         {
             "name": "laravel/framework",
-            "version": "v8.10.0",
+            "version": "v8.11.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/laravel/framework.git",
-                "reference": "0c80950806cd1bc6d9a7068585a12c2bfa23bdf3"
+                "reference": "8d1f25fb8d124d5a24df9714ed8d481c43f9efe6"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/laravel/framework/zipball/0c80950806cd1bc6d9a7068585a12c2bfa23bdf3",
-                "reference": "0c80950806cd1bc6d9a7068585a12c2bfa23bdf3",
+                "url": "https://api.github.com/repos/laravel/framework/zipball/8d1f25fb8d124d5a24df9714ed8d481c43f9efe6",
+                "reference": "8d1f25fb8d124d5a24df9714ed8d481c43f9efe6",
                 "shasum": ""
             },
             "require": {
                 "doctrine/inflector": "^1.4|^2.0",
-                "dragonmantank/cron-expression": "^3.0",
+                "dragonmantank/cron-expression": "^3.0.2",
                 "egulias/email-validator": "^2.1.10",
                 "ext-json": "*",
                 "ext-mbstring": "*",
                 "ext-openssl": "*",
                 "league/commonmark": "^1.3",
-                "league/flysystem": "^1.0.34",
+                "league/flysystem": "^1.1",
                 "monolog/monolog": "^2.0",
-                "nesbot/carbon": "^2.17",
-                "opis/closure": "^3.5.3",
+                "nesbot/carbon": "^2.31",
+                "opis/closure": "^3.6",
                 "php": "^7.3",
                 "psr/container": "^1.0",
                 "psr/simple-cache": "^1.0",
@@ -1486,13 +1485,13 @@
             "require-dev": {
                 "aws/aws-sdk-php": "^3.0",
                 "doctrine/dbal": "^2.6",
-                "filp/whoops": "^2.4",
+                "filp/whoops": "^2.8",
                 "guzzlehttp/guzzle": "^6.5.5|^7.0.1",
                 "league/flysystem-cached-adapter": "^1.0",
-                "mockery/mockery": "^1.3.1",
+                "mockery/mockery": "^1.4.2",
                 "orchestra/testbench-core": "^6.0",
                 "pda/pheanstalk": "^4.0",
-                "phpunit/phpunit": "^8.4|^9.0",
+                "phpunit/phpunit": "^8.5.8|^9.3.3",
                 "predis/predis": "^1.1.1",
                 "symfony/cache": "^5.1"
             },
@@ -1505,17 +1504,17 @@
                 "ext-pcntl": "Required to use all features of the queue worker.",
                 "ext-posix": "Required to use all features of the queue worker.",
                 "ext-redis": "Required to use the Redis cache and queue drivers (^4.0|^5.0).",
-                "filp/whoops": "Required for friendly error pages in development (^2.4).",
+                "filp/whoops": "Required for friendly error pages in development (^2.8).",
                 "fzaninotto/faker": "Required to use the eloquent factory builder (^1.9.1).",
                 "guzzlehttp/guzzle": "Required to use the HTTP Client, Mailgun mail driver and the ping methods on schedules (^6.5.5|^7.0.1).",
                 "laravel/tinker": "Required to use the tinker console command (^2.0).",
                 "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^1.0).",
                 "league/flysystem-cached-adapter": "Required to use the Flysystem cache (^1.0).",
                 "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (^1.0).",
-                "mockery/mockery": "Required to use mocking (^1.3.1).",
+                "mockery/mockery": "Required to use mocking (^1.4.2).",
                 "nyholm/psr7": "Required to use PSR-7 bridging features (^1.2).",
                 "pda/pheanstalk": "Required to use the beanstalk queue driver (^4.0).",
-                "phpunit/phpunit": "Required to use assertions and run tests (^8.4|^9.0).",
+                "phpunit/phpunit": "Required to use assertions and run tests (^8.5.8|^9.3.3).",
                 "predis/predis": "Required to use the predis connector (^1.1.2).",
                 "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).",
                 "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^4.0).",
@@ -1561,7 +1560,7 @@
                 "framework",
                 "laravel"
             ],
-            "time": "2020-10-13T14:20:53+00:00"
+            "time": "2020-10-20T20:12:53+00:00"
         },
         {
             "name": "laravel/passport",
@@ -1820,16 +1819,16 @@
         },
         {
             "name": "league/commonmark",
-            "version": "1.5.5",
+            "version": "1.5.6",
             "source": {
                 "type": "git",
                 "url": "https://github.com/thephpleague/commonmark.git",
-                "reference": "45832dfed6007b984c0d40addfac48d403dc6432"
+                "reference": "a56e91e0fa1f6d0049153a9c34f63488f6b7ce61"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/45832dfed6007b984c0d40addfac48d403dc6432",
-                "reference": "45832dfed6007b984c0d40addfac48d403dc6432",
+                "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/a56e91e0fa1f6d0049153a9c34f63488f6b7ce61",
+                "reference": "a56e91e0fa1f6d0049153a9c34f63488f6b7ce61",
                 "shasum": ""
             },
             "require": {
@@ -1911,7 +1910,7 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2020-09-13T14:44:46+00:00"
+            "time": "2020-10-17T21:33:03+00:00"
         },
         {
             "name": "league/event",
@@ -2056,16 +2055,16 @@
         },
         {
             "name": "league/mime-type-detection",
-            "version": "1.5.0",
+            "version": "1.5.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/thephpleague/mime-type-detection.git",
-                "reference": "ea2fbfc988bade315acd5967e6d02274086d0f28"
+                "reference": "353f66d7555d8a90781f6f5e7091932f9a4250aa"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/ea2fbfc988bade315acd5967e6d02274086d0f28",
-                "reference": "ea2fbfc988bade315acd5967e6d02274086d0f28",
+                "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/353f66d7555d8a90781f6f5e7091932f9a4250aa",
+                "reference": "353f66d7555d8a90781f6f5e7091932f9a4250aa",
                 "shasum": ""
             },
             "require": {
@@ -2103,7 +2102,7 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2020-09-21T18:10:53+00:00"
+            "time": "2020-10-18T11:50:25+00:00"
         },
         {
             "name": "league/oauth2-server",
@@ -7614,25 +7613,25 @@
         },
         {
             "name": "filp/whoops",
-            "version": "2.7.3",
+            "version": "2.9.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/filp/whoops.git",
-                "reference": "5d5fe9bb3d656b514d455645b3addc5f7ba7714d"
+                "reference": "2ec31f3adc54c71a59c5e3c2143d7a0e2f8899f8"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/filp/whoops/zipball/5d5fe9bb3d656b514d455645b3addc5f7ba7714d",
-                "reference": "5d5fe9bb3d656b514d455645b3addc5f7ba7714d",
+                "url": "https://api.github.com/repos/filp/whoops/zipball/2ec31f3adc54c71a59c5e3c2143d7a0e2f8899f8",
+                "reference": "2ec31f3adc54c71a59c5e3c2143d7a0e2f8899f8",
                 "shasum": ""
             },
             "require": {
-                "php": "^5.5.9 || ^7.0",
+                "php": "^5.5.9 || ^7.0 || ^8.0",
                 "psr/log": "^1.0.1"
             },
             "require-dev": {
                 "mockery/mockery": "^0.9 || ^1.0",
-                "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0",
+                "phpunit/phpunit": "^4.8.36 || ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.3",
                 "symfony/var-dumper": "^2.6 || ^3.0 || ^4.0 || ^5.0"
             },
             "suggest": {
@@ -7642,7 +7641,7 @@
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "2.6-dev"
+                    "dev-master": "2.7-dev"
                 }
             },
             "autoload": {
@@ -7671,7 +7670,7 @@
                 "throwable",
                 "whoops"
             ],
-            "time": "2020-06-14T09:00:00+00:00"
+            "time": "2020-10-20T12:00:00+00:00"
         },
         {
             "name": "friendsofphp/php-cs-fixer",
@@ -8736,16 +8735,16 @@
         },
         {
             "name": "phpunit/phpunit",
-            "version": "9.4.1",
+            "version": "9.4.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/sebastianbergmann/phpunit.git",
-                "reference": "1f09a12726593737e8a228ebb1c8647305d07c41"
+                "reference": "3866b2eeeed21b1b099c4bc0b7a1690ac6fd5baa"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/1f09a12726593737e8a228ebb1c8647305d07c41",
-                "reference": "1f09a12726593737e8a228ebb1c8647305d07c41",
+                "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3866b2eeeed21b1b099c4bc0b7a1690ac6fd5baa",
+                "reference": "3866b2eeeed21b1b099c4bc0b7a1690ac6fd5baa",
                 "shasum": ""
             },
             "require": {
@@ -8831,20 +8830,20 @@
                     "type": "github"
                 }
             ],
-            "time": "2020-10-11T07:41:19+00:00"
+            "time": "2020-10-19T09:23:29+00:00"
         },
         {
             "name": "scrivo/highlight.php",
-            "version": "v9.18.1.2",
+            "version": "v9.18.1.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/scrivo/highlight.php.git",
-                "reference": "efb6e445494a9458aa59b0af5edfa4bdcc6809d9"
+                "reference": "6a1699707b099081f20a488ac1f92d682181018c"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/scrivo/highlight.php/zipball/efb6e445494a9458aa59b0af5edfa4bdcc6809d9",
-                "reference": "efb6e445494a9458aa59b0af5edfa4bdcc6809d9",
+                "url": "https://api.github.com/repos/scrivo/highlight.php/zipball/6a1699707b099081f20a488ac1f92d682181018c",
+                "reference": "6a1699707b099081f20a488ac1f92d682181018c",
                 "shasum": ""
             },
             "require": {
@@ -8906,7 +8905,7 @@
                     "type": "github"
                 }
             ],
-            "time": "2020-08-27T03:24:44+00:00"
+            "time": "2020-10-16T07:43:22+00:00"
         },
         {
             "name": "sebastian/cli-parser",

+ 3 - 3
config/version.yml

@@ -3,11 +3,11 @@ blade-directive: version
 current:
   label: v
   major: 0
-  minor: 5
+  minor: 6
   patch: 0
-  prerelease: 2-g541a7df
+  prerelease: ''
   buildmetadata: ''
-  commit: 541a7d
+  commit: f00b28
   timestamp:
     year: 2020
     month: 10

+ 27 - 18
package-lock.json

@@ -5107,6 +5107,14 @@
                 "rgba-regex": "^1.0.0"
             }
         },
+        "is-core-module": {
+            "version": "2.0.0",
+            "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.0.0.tgz",
+            "integrity": "sha512-jq1AH6C8MuteOoBPwkxHafmByhL9j5q4OaPGdbuD+ZtQJVzH+i6E3BJDQcBA09k57i2Hh2yQbEG8yObZ0jdlWw==",
+            "requires": {
+                "has": "^1.0.3"
+            }
+        },
         "is-data-descriptor": {
             "version": "0.1.4",
             "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
@@ -9425,9 +9433,9 @@
             "dev": true
         },
         "tailwindcss": {
-            "version": "1.9.2",
-            "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-1.9.2.tgz",
-            "integrity": "sha512-D3uKSZZkh4GaKiZWmPEfNrqEmEuYdwaqXOQ7trYSQQFI5laSD9+b2FUUj5g39nk5R1omKp5tBW9wZsfJq+KIVA==",
+            "version": "1.9.5",
+            "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-1.9.5.tgz",
+            "integrity": "sha512-Je5t1fAfyW333YTpSxF+8uJwbnrkpyBskDtZYgSMMKQbNp6QUhEKJ4g/JIevZjD2Zidz9VxLraEUq/yWOx6nQg==",
             "requires": {
                 "@fullhuman/postcss-purgecss": "^2.1.2",
                 "autoprefixer": "^9.4.5",
@@ -9473,9 +9481,9 @@
                     }
                 },
                 "caniuse-lite": {
-                    "version": "1.0.30001148",
-                    "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001148.tgz",
-                    "integrity": "sha512-E66qcd0KMKZHNJQt9hiLZGE3J4zuTqE1OnU53miEVtylFbwOEmeA5OsRu90noZful+XGSQOni1aT2tiqu/9yYw=="
+                    "version": "1.0.30001150",
+                    "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001150.tgz",
+                    "integrity": "sha512-kiNKvihW0m36UhAFnl7bOAv0i1K1f6wpfVtTF5O5O82XzgtBnb05V0XeV3oZ968vfg2sRNChsHw8ASH2hDfoYQ=="
                 },
                 "chalk": {
                     "version": "4.1.0",
@@ -9525,9 +9533,9 @@
                     "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
                 },
                 "node-releases": {
-                    "version": "1.1.63",
-                    "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.63.tgz",
-                    "integrity": "sha512-ukW3iCfQaoxJkSPN+iK7KznTeqDGVJatAEuXsJERYHa9tn/KaT5lBdIyxQjLEVTzSkyjJEuQ17/vaEjrOauDkg=="
+                    "version": "1.1.64",
+                    "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.64.tgz",
+                    "integrity": "sha512-Iec8O9166/x2HRMJyLLLWkd0sFFLrFNy+Xf+JQfSQsdBJzPcHpNl3JQ9gD4j+aJxmCa25jNsIbM4bmACtSbkSg=="
                 },
                 "postcss-selector-parser": {
                     "version": "6.0.4",
@@ -9546,10 +9554,11 @@
                     "integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ=="
                 },
                 "resolve": {
-                    "version": "1.17.0",
-                    "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz",
-                    "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==",
+                    "version": "1.18.1",
+                    "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.18.1.tgz",
+                    "integrity": "sha512-lDfCPaMKfOJXjy0dPayzPdF1phampNWr3qFCjAu+rw/qbQmr5jWH5xN2hwh9QKfw9E5v4hwV7A+jrCmL8yjjqA==",
                     "requires": {
+                        "is-core-module": "^2.0.0",
                         "path-parse": "^1.0.6"
                     }
                 },
@@ -10059,9 +10068,9 @@
             "integrity": "sha512-uhmLFETqPPNyuLLbsKz6ioJ4q7AZHzD8ZVFNATNyICSZouqP2Sz0rotWQC8UNBF6VGSCs5abnKJoStA6JbCbfg=="
         },
         "vue-good-table": {
-            "version": "2.21.0",
-            "resolved": "https://registry.npmjs.org/vue-good-table/-/vue-good-table-2.21.0.tgz",
-            "integrity": "sha512-e384AGlmEBG0CfTkZXN/OZe1O58V2mbxQafsKqzVrqvROcMZsa9iSyK11D4YS2JzlJo9mRqsad4/vrV/U/Xbdw==",
+            "version": "2.21.1",
+            "resolved": "https://registry.npmjs.org/vue-good-table/-/vue-good-table-2.21.1.tgz",
+            "integrity": "sha512-pirdVPwo1d4IzQLkDXByD4jvp/l4afo8S/U0ORw1eOWDt6gyvIoEcRz2uw33ZXemMs5NDs79MinbXm9Nhhzr+Q==",
             "requires": {
                 "date-fns": "^2.0.0-beta.4",
                 "diacriticless": "1.0.1",
@@ -10073,9 +10082,9 @@
             },
             "dependencies": {
                 "date-fns": {
-                    "version": "2.15.0",
-                    "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.15.0.tgz",
-                    "integrity": "sha512-ZCPzAMJZn3rNUvvQIMlXhDr4A+Ar07eLeGsGREoWU19a3Pqf5oYa+ccd+B3F6XVtQY6HANMFdOQ8A+ipFnvJdQ=="
+                    "version": "2.16.1",
+                    "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.16.1.tgz",
+                    "integrity": "sha512-sAJVKx/FqrLYHAQeN7VpJrPhagZc9R4ImZIWYRFZaaohR3KzmuK88touwsSwSVT8Qcbd4zoDsnGfX4GFB4imyQ=="
                 }
             }
         },

+ 2 - 2
package.json

@@ -21,11 +21,11 @@
         "postcss-import": "^11.1.0",
         "postcss-nesting": "^5.0.0",
         "resolve-url-loader": "^2.3.2",
-        "tailwindcss": "^1.9.2",
+        "tailwindcss": "^1.9.5",
         "tippy.js": "^4.3.5",
         "v-clipboard": "^2.2.3",
         "vue": "^2.6.12",
-        "vue-good-table": "^2.21.0",
+        "vue-good-table": "^2.21.1",
         "vue-multiselect": "^2.1.6",
         "vue-notification": "^1.3.20",
         "vue-template-compiler": "^2.6.12",

+ 1 - 0
resources/views/settings/show.blade.php

@@ -212,6 +212,7 @@
                             <select id="default-alias-format" class="block appearance-none w-full text-grey-700 bg-grey-100 p-3 pr-8 rounded shadow focus:shadow-outline" name="format" required>
                                 <option value="uuid" {{ $user->default_alias_format === 'uuid' ? 'selected' : '' }}>UUID</option>
                                 <option value="random_words" {{ $user->default_alias_format === 'random_words' ? 'selected' : '' }}>Random Words</option>
+                                <option value="custom" {{ $user->default_alias_format === 'custom' ? 'selected' : '' }}>Custom</option>
                             </select>
                             <div class="pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-gray-700">
                                 <svg class="fill-current h-4 w-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M9.293 12.95l.707.707L15.657 8l-1.414-1.414L10 10.828 5.757 6.586 4.343 8z"/></svg>