Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ListStringInput does not properly set new value for nullable underlying type #68

Closed
daalcant opened this issue Jul 14, 2021 · 1 comment · Fixed by #65
Closed

ListStringInput does not properly set new value for nullable underlying type #68

daalcant opened this issue Jul 14, 2021 · 1 comment · Fixed by #65
Labels
bug Something isn't working

Comments

@daalcant
Copy link
Contributor

Description:
The Sandbox contains broken "Add String" buttons when viewing the following object types:

  • DriverObject under "LinkedAgainst"
  • FirewallObject under "LocalAddresses"
  • FirewallObject under "LocalPorts"
  • FirewallObject under "RemoteAddresses"
  • FirewallObject under "RemotePorts"
  • RegistryObject under "Permissions"
  • RegistryObject under "SubKeys"

Expected behavior:
The "Add String" buttons should add strings to a list displayed as a dropdown

To Reproduce:
Steps to reproduce the behavior:

  1. Run ASA, open GUI
  2. Click Sandbox page
  3. Select any of the above mentioned types, e.g. DriverObject
  4. Create the object
  5. Click 'View' tab to view the object, expand its contents
  6. Find some broken "Add String" buttons

Configuration:

  • ASA Application Version: v2.3.146-beta
  • OAT Application Version: 718b12b
@daalcant daalcant changed the title Sandbox: Broken "Add String" Buttons in Multiple Object Types Sandbox: Broken "Add String" buttons in multiple object types Jul 14, 2021
@gfs
Copy link
Contributor

gfs commented Jul 15, 2021

This appears to be because the underlying type here is List<string>? and not List<string>. OAT appears to need some work with nullable types in general.

@gfs gfs transferred this issue from microsoft/AttackSurfaceAnalyzer Jul 15, 2021
@gfs gfs changed the title Sandbox: Broken "Add String" buttons in multiple object types ListStringInput does not properly set new value for nullable underlying type Jul 15, 2021
gfs added a commit that referenced this issue Jul 16, 2021
@gfs gfs added the bug Something isn't working label Jul 27, 2021
@gfs gfs closed this as completed in #65 Jul 28, 2021
gfs added a commit that referenced this issue Jul 28, 2021
* Carry Scaffold Parameter Value Types

* Update ScaffoldInput.razor

* Update FlagsInput to use carried type

* Update Scaffold.cs

* Update ScaffoldInput.razor

* Move Tuple Check to Helpers.cs

* Update Helpers.cs

* Update Helpers.cs

* Update Helpers.cs

* Revert "Update Helpers.cs"

This reverts commit fa6dee3.

* Style ObjectInput

* Update ScaffoldInput.razor

* Update ScaffoldInput.razor

* Update PropertyInput.razor

* Update BoolInput.razor

* Update FlagsInput.razor

* Fix #68 and #69

* Should fix button to set nullables.

* Finish fixing #67

Now works with nullable enums that are default to null.

* Fixes

* Update OAT.Blazor.csproj

* Mostly Fix GUI

Issues:
Many elements cannot be clicked on, but can be tabbed to and used.
Icons images are not sized correctly.

* Improve which constructors are supported to match the inputs we have supported.

Fixes setting values in dictionaries.

* Remove merge comments.

* Also show the checkbox if the value is null

We cannot actually check if reference types are nullable so we need to check if the value is null and show the checkbox when it is null.

We do not show the checkbox if the value is no longer null and we can't confirm that its nullable.

* Support lists of enums

* Bump dependencies

Co-authored-by: David Alcantar <daalcant@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants