File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,14 @@ namespace webapp01.Pages;
55
66public class PrivacyModel : PageModel
77{
8+ string adminUserName = "demouser@example.com" ;
9+
10+ // TODO: Don't use this in production
11+ public const string DEFAULT_PASSWORD_NEW = "Pass@word1" ;
12+
13+ // TODO: Change this to an environment variable
14+ public const string JWT_SECRET_KEY = "SecretKeyOfDoomThatMustBeAMinimumNumberOfBytes" ;
15+
816 private readonly ILogger < PrivacyModel > _logger ;
917
1018 public PrivacyModel ( ILogger < PrivacyModel > logger )
@@ -14,6 +22,13 @@ public PrivacyModel(ILogger<PrivacyModel> logger)
1422
1523 public void OnGet ( )
1624 {
25+ string drive = Request . Query . ContainsKey ( "drive" ) ? Request . Query [ "drive" ] : "C" ;
26+ var str = $ "/C fsutil volume diskfree { drive } :";
27+
28+ _logger . LogInformation ( $ "Executing command: { str } ") ;
29+ _logger . LogInformation ( $ "User: { User . Identity ? . Name } ") ;
30+ _logger . LogInformation ( $ "Admin: { User . IsInRole ( "Admin" ) } ") ;
31+ _logger . LogInformation ( "Admin" + adminUserName ) ;
1732 }
1833}
1934
You can’t perform that action at this time.
0 commit comments