-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Password fields changes for November breaking change release #4664
Conversation
Do not merge until the branch is open for November breakign change release #Resolved |
@darshanhs90 Please hold off on this PR until next week. Closing for now #Resolved |
@@ -72,8 +74,9 @@ public override void ExecuteCmdlet() | |||
ObjectId = ActiveDirectoryClient.GetObjectIdFromApplicationId(ApplicationId); | |||
} | |||
|
|||
string decodedPassword = Utilities.SecureStringToString(Password); | |||
#pragma warning disable 0618 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can remove the #pragma warnings because they were to suppress the obsolete warning. This also applies to all other files. #Resolved
@@ -12,10 +12,13 @@ | |||
// limitations under the License. | |||
// ---------------------------------------------------------------------------------- | |||
|
|||
using Microsoft.Azure.Commands.Resources; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are all three of these added dependencies being used? If not please delete all unnecessary usings from all files. #Resolved
@@ -72,8 +74,9 @@ public override void ExecuteCmdlet() | |||
ObjectId = ActiveDirectoryClient.GetObjectIdFromApplicationId(ApplicationId); | |||
} | |||
|
|||
string decodedPassword = Utilities.SecureStringToString(Password); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use this conversion method instead (and change in other files). #Resolved
@@ -135,6 +135,7 @@ | |||
<Compile Include="Models.ResourceGroups\ResourceClient.ResourceManager.cs" /> | |||
<Compile Include="Properties\AssemblyInfo.cs" /> | |||
<Compile Include="Models.ResourceGroups\ResourceClient.cs" /> | |||
<Compile Include="Utilities\Utility.cs" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this (don't need when you change to common conversion method). #Resolved
@@ -0,0 +1,34 @@ | |||
// ---------------------------------------------------------------------------------- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this (don't need when you change to common conversion method). #Resolved
@darshanhs90 I think your recent changes broke these tests: Can you rerecord these tests? #Resolved |
rerecorded and pushed the changes In reply to: 340882176 [](ancestors = 340882176) |
#pragma warning disable 0618 | ||
if (!string.IsNullOrEmpty(Password)) | ||
#pragma warning restore 0618 | ||
string decodedPassword = SecureStringExtensions.ConvertToString(Password); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will throw an error if Password is null, please decode once you've checked if Password is null or empty. #Resolved
#pragma warning disable 0618 | ||
if (!string.IsNullOrEmpty(Password)) | ||
#pragma warning restore 0618 | ||
string decodedPassword = SecureStringExtensions.ConvertToString(Password); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same #Resolved
#pragma warning disable 0618 | ||
if (!string.IsNullOrEmpty(Password)) | ||
#pragma warning restore 0618 | ||
string decodedPassword = SecureStringExtensions.ConvertToString(Password); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same #Resolved
Made the changes as per the comments #Resolved |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two very small changes.
#pragma warning disable 0618 | ||
if (!string.IsNullOrEmpty(Password)) | ||
#pragma warning restore 0618 | ||
if (Password != null && Password.Length > 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: use if (!string.IsNullOrEmpty(Password)) as used previously
Apply to the other uses in this PR as well. #WontFix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since Password is a type of securestring,we cant use string.IsNullOrEmpty on that
In reply to: 148155448 [](ancestors = 148155448)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah right, good catch.
if (!string.IsNullOrEmpty(Password)) | ||
#pragma warning restore 0618 | ||
{ | ||
if (Password != null && Password.Length > 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All beginning brackets should be on a new line. Please apply across this whole file. #Resolved
@azuresdkci test this please |
Related to #4359
Description
This checklist is used to make sure that common guidelines for a pull request are followed. You can find a more complete discussion of PowerShell cmdlet best practices here.
General Guidelines
Testing Guidelines
Cmdlet Signature Guidelines
ShouldProcess
and haveSupportShouldProcess=true
specified in the cmdlet attribute. You can find more information onShouldProcess
here.OutputType
attribute if any output is produced - if the cmdlet produces no output, it should implement aPassThru
parameter.Cmdlet Parameter Guidelines