security updates

This commit is contained in:
2024-06-06 15:13:53 -05:00
parent 8f8797fbe6
commit e1ab786140
8 changed files with 157 additions and 115 deletions
+1 -1
View File
@@ -69,7 +69,7 @@ TABLESPACE pg_default;
ALTER TABLE IF EXISTS public.users
OWNER to postgres;
```
8. Set environment variables `POSTGRES_ADDRESS` (IP address), `POSTGRES_PORT` (default 5432), `POSTGRES_USERNAME`, and `POSTGRES_PASSWORD` to appropriate information for your postgres database. Also set `SECRET_KEY` to anything you want to genera te JSON Web Tokens.
8. Set environment variables `JOBLINK_POSTGRES_ADDRESS` (IP address), `JOBLINK_POSTGRES_PORT` (default 5432), `JOBLINK_POSTGRES_USERNAME`, and `JOBLINK_POSTGRES_PASSWORD` to appropriate information for your postgres database. Also set `JOBLINK_SECRET_KEY` to anything you want to generate JSON Web Tokens.
9. Set lib/create_first_user.dart username and password variables at top of file and run with `dart run lib/create_first_user.dart`
Note: the username and password you use here will be what you use to log into the app as an admin
+4 -4
View File
@@ -20,11 +20,11 @@ var parameters = Argon2Parameters(
);
final postgres = PostgreSQLConnection(
Platform.environment['POSTGRES_ADDRESS']!,
int.parse(Platform.environment['POSTGRES_PORT']!),
Platform.environment['JOBLINK_POSTGRES_ADDRESS']!,
int.parse(Platform.environment['JOBLINK_POSTGRES_PORT']!),
'fbla',
username: Platform.environment['POSTGRES_USERNAME'],
password: Platform.environment['POSTGRES_PASSWORD'],
username: Platform.environment['JOBLINK_POSTGRES_USERNAME'],
password: Platform.environment['JOBLINK_POSTGRES_PASSWORD'],
);
Future<void> main() async {
+5 -5
View File
@@ -11,7 +11,7 @@ import 'package:http/http.dart' as http;
import 'package:argon2/argon2.dart';
SecretKey secretKey = SecretKey(Platform.environment['SECRET_KEY']!);
SecretKey secretKey = SecretKey(Platform.environment['JOBLINK_SECRET_KEY']!);
enum BusinessType {
food,
@@ -107,11 +107,11 @@ const _port = 8000;
final postgres = PostgreSQLConnection(
Platform.environment['POSTGRES_ADDRESS']!,
int.parse(Platform.environment['POSTGRES_PORT']!),
Platform.environment['JOBLINK_POSTGRES_ADDRESS']!,
int.parse(Platform.environment['JOBLINK_POSTGRES_PORT']!),
'fbla',
username: Platform.environment['POSTGRES_USERNAME'],
password: Platform.environment['POSTGRES_PASSWORD'],
username: Platform.environment['JOBLINK_POSTGRES_USERNAME'],
password: Platform.environment['JOBLINK_POSTGRES_PASSWORD'],
);
+82 -45
View File
@@ -5,10 +5,15 @@ packages:
dependency: transitive
description:
name: _fe_analyzer_shared
sha256: eb376e9acf6938204f90eb3b1f00b578640d3188b4c8a8ec054f9f479af8d051
sha256: "5aaf60d96c4cd00fe7f21594b5ad6a1b699c80a27420f8a837f4d68473ef09e3"
url: "https://pub.dev"
source: hosted
version: "64.0.0"
version: "68.0.0"
_macros:
dependency: transitive
description: dart
source: sdk
version: "0.1.0"
adaptive_number:
dependency: transitive
description:
@@ -21,10 +26,10 @@ packages:
dependency: transitive
description:
name: analyzer
sha256: "69f54f967773f6c26c7dcb13e93d7ccee8b17a641689da39e878d5cf13b06893"
sha256: "21f1d3720fd1c70316399d5e2bccaebb415c434592d778cce8acb967b8578808"
url: "https://pub.dev"
source: hosted
version: "6.2.0"
version: "6.5.0"
argon2:
dependency: "direct main"
description:
@@ -37,10 +42,10 @@ packages:
dependency: transitive
description:
name: args
sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596
sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a"
url: "https://pub.dev"
source: hosted
version: "2.4.2"
version: "2.5.0"
async:
dependency: transitive
description:
@@ -61,10 +66,10 @@ packages:
dependency: transitive
description:
name: buffer
sha256: "8962c12174f53e2e848a6acd7ac7fd63d8a1a6a316c20c458a832d87eba5422a"
sha256: "389da2ec2c16283c8787e0adaede82b1842102f8c8aae2f49003a766c5c6b3d1"
url: "https://pub.dev"
source: hosted
version: "1.2.0"
version: "1.2.3"
charcode:
dependency: transitive
description:
@@ -73,6 +78,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.3.1"
clock:
dependency: transitive
description:
name: clock
sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
url: "https://pub.dev"
source: hosted
version: "1.1.1"
collection:
dependency: transitive
description:
@@ -93,10 +106,10 @@ packages:
dependency: transitive
description:
name: coverage
sha256: "2fb815080e44a09b85e0f2ca8a820b15053982b2e714b59267719e8a9ff17097"
sha256: "3945034e86ea203af7a056d98e98e42a5518fff200d6e8e6647e1886b07e936e"
url: "https://pub.dev"
source: hosted
version: "1.6.3"
version: "1.8.0"
crypto:
dependency: transitive
description:
@@ -109,10 +122,10 @@ packages:
dependency: "direct main"
description:
name: dart_jsonwebtoken
sha256: "6703695f581fc54d0a7e5f281c5538735167605bb9e5abd208c8b330625a92b1"
sha256: "346e9a21e4bf6e6a431e19ece00ebb2e3668e1e339cabdf6f46d18d88692a848"
url: "https://pub.dev"
source: hosted
version: "2.12.1"
version: "2.14.0"
ed25519_edwards:
dependency: transitive
description:
@@ -141,10 +154,10 @@ packages:
dependency: transitive
description:
name: frontend_server_client
sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612"
sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694
url: "https://pub.dev"
source: hosted
version: "3.2.0"
version: "4.0.0"
glob:
dependency: transitive
description:
@@ -165,10 +178,10 @@ packages:
dependency: "direct main"
description:
name: http
sha256: "759d1a329847dd0f39226c688d3e06a6b8679668e350e2891a6474f8b4bb8525"
sha256: "761a297c042deedc1ffbb156d6e2af13886bb305c2a343a4d972504cd67dd938"
url: "https://pub.dev"
source: hosted
version: "1.1.0"
version: "1.2.1"
http_methods:
dependency: transitive
description:
@@ -205,10 +218,10 @@ packages:
dependency: transitive
description:
name: js
sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf
url: "https://pub.dev"
source: hosted
version: "0.6.7"
version: "0.7.1"
lints:
dependency: "direct dev"
description:
@@ -225,30 +238,38 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.2.0"
macros:
dependency: transitive
description:
name: macros
sha256: "12e8a9842b5a7390de7a781ec63d793527582398d16ea26c60fed58833c9ae79"
url: "https://pub.dev"
source: hosted
version: "0.1.0-main.0"
matcher:
dependency: transitive
description:
name: matcher
sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
url: "https://pub.dev"
source: hosted
version: "0.12.16"
version: "0.12.16+1"
meta:
dependency: transitive
description:
name: meta
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
url: "https://pub.dev"
source: hosted
version: "1.9.1"
version: "1.15.0"
mime:
dependency: transitive
description:
name: mime
sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e
sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2"
url: "https://pub.dev"
source: hosted
version: "1.0.4"
version: "1.0.5"
node_preamble:
dependency: transitive
description:
@@ -269,10 +290,10 @@ packages:
dependency: transitive
description:
name: path
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
url: "https://pub.dev"
source: hosted
version: "1.8.3"
version: "1.9.0"
pedantic:
dependency: transitive
description:
@@ -285,10 +306,10 @@ packages:
dependency: transitive
description:
name: pointycastle
sha256: "7c1e5f0d23c9016c5bbd8b1473d0d3fb3fc851b876046039509e18e0c7485f2c"
sha256: "4be0097fcf3fd3e8449e53730c631200ebc7b88016acecab2b0da2f0149222fe"
url: "https://pub.dev"
source: hosted
version: "3.7.3"
version: "3.9.1"
pool:
dependency: transitive
description:
@@ -301,10 +322,10 @@ packages:
dependency: "direct main"
description:
name: postgres
sha256: "98457afc06dd3f9d6892c178ea03ca9659e454107c9be90111e607691998d70d"
sha256: f8e4f14734d096277f77ed5dddefcbc1ce18f8f7db5b7ff4b5dd6df2d9db2730
url: "https://pub.dev"
source: hosted
version: "2.6.2"
version: "2.6.4"
pub_semver:
dependency: transitive
description:
@@ -365,10 +386,10 @@ packages:
dependency: transitive
description:
name: shelf_web_socket
sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1"
sha256: "073c147238594ecd0d193f3456a5fe91c4b0abbcc68bf5cd95b36c4e194ac611"
url: "https://pub.dev"
source: hosted
version: "1.0.4"
version: "2.0.0"
source_map_stack_trace:
dependency: transitive
description:
@@ -429,26 +450,26 @@ packages:
dependency: "direct dev"
description:
name: test
sha256: "9b0dd8e36af4a5b1569029949d50a52cb2a2a2fdaa20cebb96e6603b9ae241f9"
sha256: "7ee44229615f8f642b68120165ae4c2a75fe77ae2065b1e55ae4711f6cf0899e"
url: "https://pub.dev"
source: hosted
version: "1.24.6"
version: "1.25.7"
test_api:
dependency: transitive
description:
name: test_api
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
url: "https://pub.dev"
source: hosted
version: "0.6.1"
version: "0.7.2"
test_core:
dependency: transitive
description:
name: test_core
sha256: "4bef837e56375537055fdbbbf6dd458b1859881f4c7e6da936158f77d61ab265"
sha256: "55ea5a652e38a1dfb32943a7973f3681a60f872f8c3a05a14664ad54ef9c6696"
url: "https://pub.dev"
source: hosted
version: "0.5.6"
version: "0.6.4"
typed_data:
dependency: transitive
description:
@@ -469,10 +490,10 @@ packages:
dependency: transitive
description:
name: vm_service
sha256: "0fae432c85c4ea880b33b497d32824b97795b04cdaa74d270219572a1f50268d"
sha256: "360c4271613beb44db559547d02f8b0dc044741d0eeb9aa6ccdb47e8ec54c63a"
url: "https://pub.dev"
source: hosted
version: "11.9.0"
version: "14.2.3"
watcher:
dependency: transitive
description:
@@ -481,22 +502,38 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.1.0"
web:
dependency: transitive
description:
name: web
sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27"
url: "https://pub.dev"
source: hosted
version: "0.5.1"
web_socket:
dependency: transitive
description:
name: web_socket
sha256: "24301d8c293ce6fe327ffe6f59d8fd8834735f0ec36e4fd383ec7ff8a64aa078"
url: "https://pub.dev"
source: hosted
version: "0.1.5"
web_socket_channel:
dependency: transitive
description:
name: web_socket_channel
sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b
sha256: a2d56211ee4d35d9b344d9d4ce60f362e4f5d1aafb988302906bd732bc731276
url: "https://pub.dev"
source: hosted
version: "2.4.0"
version: "3.0.0"
webkit_inspection_protocol:
dependency: transitive
description:
name: webkit_inspection_protocol
sha256: "67d3a8b6c79e1987d19d848b0892e582dbb0c66c57cc1fef58a177dd2aa2823d"
sha256: "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572"
url: "https://pub.dev"
source: hosted
version: "1.2.0"
version: "1.2.1"
yaml:
dependency: transitive
description:
@@ -506,4 +543,4 @@ packages:
source: hosted
version: "3.1.2"
sdks:
dart: ">=3.0.6 <4.0.0"
dart: ">=3.4.0-256.0.dev <4.0.0"