Inappropriate references to ushort type in New-DkimSigningConfig and Rotate-DkimSigningConfig.
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Facilidade para iniciantes
- 45/100
- Tipo de issue
- Bug
- Clareza
- Claramente especificada
- Status de atividade
- Estagnada
- Stack de tecnologia
- powershell
- Domínio
- backend
Direção de pesquisa
Find the definitions of New-DkimSigningConfig and Rotate-DkimSigningConfig in the ExchangeOnlineManagement module and inspect their KeySize parameter types. Check how similar parameters are typed elsewhere in the module, then verify that both commands can be called under Windows PowerShell 5.1. Done means neither function fails with a type lookup error.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest version
- Search the existing issues.
Steps to reproduce
According to the documentation, for the ExchangeOnlineManagement module:
"All versions of the module are supported in Windows PowerShell 5.1."
Yet, since 3.5.0, two functions have declared parameters using the [ushort] type, which does not exist in the .NET Framework, causing both functions to fail under Windows PowerShell with the "unable to find type [ushort]" error. The issue still exists in 3.6.0.
This is not an issue under PowerShell (as distinct from Windows PowerShell) where an additional library declares the ushort type (system.private.corelib).
Example from New-DkimSigningConfig showing inappropriate ushort declaration for KeySize parameter:
`function script:New-DkimSigningConfig
{
[CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact='Medium')]
param(
[string]
${AdminDisplayName},
${BodyCanonicalization},
[Parameter(Mandatory=$true, Position=0)]
${DomainName},
[Parameter(Mandatory=$true, Position=1)]
[bool]
${Enabled},
${HeaderCanonicalization},
[ValidateSet('1024','2048')]
[ushort]
${KeySize}
)
`
Expected behavior
That the commands declare the "KeySize" parameter using either [uint16] (if for some reason it must be a 16-bit value) or - in line with the rest of the module's functions - [uint32] (which to my mind would be more consistent).
This would resolve the type exception while maintaining compatibility on Windows PowerShell.
Actual behavior
Under Windows PowerShell, calls to both New-DkimSigningConfig and Rotate-DkimSigningConfig fail immediately (before function entry) on account of the ushort type not existing, as shown in the screenshot.
Error details
Unable to find type [ushort].
At C:\Users\lain.robertson\AppData\Local\Temp\tmpEXO_faj3kift.kut\tmpEXO_faj3kift.kut.psm1:25026 char:5
+ [ushort]
+ ~~~~~~~~
+ CategoryInfo : InvalidOperation: (ushort:TypeName) [], RuntimeException
+ FullyQualifiedErrorId : TypeNotFound
Environment data
PS D:\Data> $PSVersionTable
Name Value
---- -----
PSVersion 5.1.19041.4894
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.19041.4894
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Version
3.6.0
Visuals
- Linguagem predominante
- PowerShell
- Estrelas
- 289
- Forks
- 83
- Merge médio
- 1min
- PRs com merge (30d)
- 1
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de PowerShell/PowerShellGallery
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 38/100
PowerShell/PowerShellGallery#357 · 3 comentários · 4 reações ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 48/100
PowerShell/PowerShellGallery#355 ·
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 31/100
PowerShell/PowerShellGallery#354 · 1 comentário · 3 reações ·
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 35/100
PowerShell/PowerShellGallery#353 · 5 reações ·
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
PowerShell/PowerShellGallery#350 · 7 comentários · 8 reações ·
Todas as issues de PowerShell/PowerShellGallery
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 80/100
OrchardCMS/OrchardCore#20192 ·
Mantenedores costumam responder em até 1 dia
-
0. Needs triage 35-feedback bug
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 62/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
getgrav/grav-plugin-api#74 ·
-
enhancement freigegeben Haushalts-Admin
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
motom001/dms#688 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
btclib-org/btclib-wallet#667 ·
Mantenedores costumam responder em até 1 dia