Closed jonathanstowe closed 3 years ago
Thanks for checking it out! I'll look at it soon.
This seems to be an issue in Type::EnumHOW
.
use Type::EnumHOW;
my %values = a => 1, b => 13;
my $new-enum = Type::EnumHOW.new_type(name => 'NewEnum', :base_type(Int));
$new-enum.^set_package: OUR;
$new-enum.^add_attribute_with_values('$!symbol', %values, :type(Int));
$new-enum.^compose;
$new-enum.^add_enum_values(%values.sort(*.value).map(*.key));
$new-enum.^compose_values;
say OUR::b.value; # is 1, must be 13
And an old one... https://github.com/Kaiepi/p6-Type-EnumHOW/issues/1 Investigating.
UPD: apparently, just me doing it wrong, d'oh.
Ping @jonathanstowe Thank you so much for looking at this. I fixed the issue and added a test. I also de-bitrotted the repo a bit and fixed a couple of other issues I found along the way.
I uploaded the updated dependencies, they should be indexed shortly (I hope), I also updated the META to download them, so just doing zef install --deps-only .
should get you the fixed version.
Please, report any issues of this sort if you have time, they are welcome. Closing, re-open if news.
I'll look tomorrow when I'm on the work VPN. Thanks for looking so quickly.
Just tested that and it's all good:
[TRACE(anon 1)] Cro::LDAP::MessageParser EMIT LDAP MSG [1] BindResponse
BindResponse+{Cro::LDAP::ControlCarry[List]}.new(result-code => ResultCode::invalidCredentials, matched-dn => "", error-message => "80090308: LdapErr: DSID-0C090447, comment: AcceptSecurityContext error, data 52e, v3839\0", referral => ASNSequenceOf[Any], server-sasl-creds => Any)
Thanks for you help :1st_place_medal: Now to rework the authentication in my application to use that.
This might be a server specific thing but against a work LDAP server (which may or may not be Microsoft ADFS exposed as LDAP,) when an invalid username or password is supplied (it doesn't matter which,) to 'bind' then it simply hangs.
The output with
CRO_TRACE=1
is:It looks like there are actually two problems, a) it isn't finding the correct enum for returncode (49 does appear to be present in the asn grammar you have,) and b) the error in the parser isn't being propagated so the failure to parse the response leaves it waiting for a response it can parse.