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

fix: Read windows path error #514

Closed
wants to merge 3 commits into from
Closed

Conversation

alexanyang
Copy link

@alexanyang alexanyang commented Sep 14, 2020

this issue is happened on windows 10 system,it may cased by incorrect string parse with url.Parse() method .that split string with ' : ',and make it wrong . The error message is as follows:

time="2020-01-08T15:43:39+08:00" level=error msg="Unable to update access rules from given location, changes will be ignored. Check the configuration or restart the service if the issue persists." error="parse file://\F:\aweso
meProject\bin\resource-server.json: invalid port ":\awesomeProject\bin\resource-server.json" after host" file="file:///F:/awesomeProject/bin/resource-server.json"

Related issue

Proposed changes

Checklist

  • I have read the contributing guidelines.
  • I have read the security policy.
  • I confirm that this pull request does not address a security
    vulnerability. If this pull request addresses a security. vulnerability, I
    confirm that I got green light (please contact
    [email protected]) from the maintainers to push
    the changes.
  • I have added tests that prove my fix is effective or that my feature
    works.
  • I have added or changed the documentation.

Further comments

this issue is happened on windows 10 system,it may cased by incorrect string parse with url.Parse() method .that split string with ' : ',and make it wrong . The error message is as follows:

time="2020-01-08T15:43:39+08:00" level=error msg="Unable to update access rules from given location, changes will be ignored. Check the configuration or restart the service if the issue persists." error="parse file://\F:\aweso
meProject\bin\resource-server.json: invalid port ":\\awesomeProject\\bin\\resource-server.json" after host" file="file:///F:/awesomeProject/bin/resource-server.json"
@CLAassistant
Copy link

CLAassistant commented Sep 14, 2020

CLA assistant check
All committers have signed the CLA.

just delete pieces of code
@alexanyang
Copy link
Author

if you need this fix ,just test and merge it

Copy link
Member

@aeneasr aeneasr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, given that this changeset removes a check and does not introduce new tests demonstrating the effectiveness and potential regressions, could you please add them so that we know this does what it is supposed to do? Thank you!

@alexanyang alexanyang changed the title fix windows path error fix:read windows path error Sep 17, 2020
@alexanyang alexanyang changed the title fix:read windows path error fix: Read windows path error Sep 17, 2020
@alexanyang
Copy link
Author

alexanyang commented Sep 21, 2020

Thank you, given that this changeset removes a check and does not introduce new tests demonstrating the effectiveness and potential regressions, could you please add them so that we know this does what it is supposed to do? Thank you!

Sorry ,I am not free to give you a test example. That error caused by parse twice ,you can test with any URL likes H:\Temp\authkeeper\src\github.com\ory.
And if e.path.Scheme == "file" == true,that means you had parse once . Second url.Parse(...) will make error that will change value of that struct.

@aeneasr
Copy link
Member

aeneasr commented Sep 30, 2020

Ok, I will have to check this on a windows machine. But without tests, this can't unfortunately be merged :/

@PatrLind PatrLind mentioned this pull request Oct 15, 2020
5 tasks
@aeneasr aeneasr closed this in 6a05682 Nov 18, 2020
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

Successfully merging this pull request may close these issues.

3 participants