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

time.RFC3339Nano Precision is high ONLY in linux and its causing 401 unauthorised, when forming Digest Auth Security xml #51

Open
chaymankala opened this issue Aug 8, 2024 · 0 comments

Comments

@chaymankala
Copy link

In gosoap/ws-security.go
In func NewSecurity

created := time.Now().UTC().Format(time.RFC3339Nano)

Output in mac
2024-08-08T10:05:42.785935Z

Output in linux
2024-08-08T10:06:17.763359929Z

In the Linux output, the time is formatted using a higher level of precision, including 9 digits after the decimal point, representing nanoseconds.

Because of this, when I try connecting to my Hikvision Camera/DVR, it is throwing 401 unauthorised error.
When I changed the code to
created := time.Now().UTC().Format(time.RFC3339) // removed Nano
It started working fine.

Please fix this issue, so that it works everywhere.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant