Skip to content

fix: parse file_mode as 8 based value #163

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

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

suzuki-shunsuke
Copy link
Contributor

@suzuki-shunsuke suzuki-shunsuke commented Mar 30, 2021

Close #66

}
// v == MinInt
return 0
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@suzuki-shunsuke
Copy link
Contributor Author

Hmm...
DiffSuppressFunc doesn't work as expected.
I'll investigate.

@github-actions
Copy link

This pull request is stale because it has been open 60 days with no activity.
Remove stale label or comment or this will be closed in 7 days.
If you don't want this pull request to be closed, please set the label pinned.

@github-actions github-actions bot added the stale label May 29, 2021
@tomalok
Copy link

tomalok commented May 29, 2021

Per my comment in #66 this is still not working

@mavogel mavogel added this to the v2.13.0 milestone May 30, 2021
@github-actions github-actions bot removed the stale label May 30, 2021
return 0, fmt.Errorf("file_mode must be greater equal than 0: %d", a)
}
if a > 0o777 {
return 0, fmt.Errorf("file_mode must be less equal than 0o777: %d", a)
Copy link

Choose a reason for hiding this comment

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

Limiting it to 0o777 means limits the mode to just [ugo][rwx] -- it should also be possible to set the setuid, setgid, and sticky bits. To allow these, use 0o4777 as the maximum value.

Also, does ParseInt(s, 8, 32) handle the situation when the string is leads with 0 and 0o?

Do we also want to keep the current behavior of assuming the string is a decimal value, unless the string leads with a 0 or 0o? If not, we should make it very clear in the changelog (etc.) that the workaround will no longer work.

@mavogel
Copy link
Contributor

mavogel commented Jun 21, 2021

@suzuki-shunsuke how about we skip the suppress function and make it a Breaking Change for v3.0.0? Would you be fine with this?

@suzuki-shunsuke
Copy link
Contributor Author

I'll fix the conflict.

how about we skip the suppress function and make it a Breaking Change for v3.0.0? Would you be fine with this?

I'll consider.

@mavogel
Copy link
Contributor

mavogel commented Jun 22, 2021

Ok I'll remove it from the next milestone and we will put it accordingly to the changes to another v2.x or then to v3.x

@mavogel mavogel removed this from the v2.13.0 milestone Jun 22, 2021
@suzuki-shunsuke suzuki-shunsuke force-pushed the fix/fix-parse-filemode branch from ba47f0a to 42c1f63 Compare June 22, 2021 23:16
@suzuki-shunsuke suzuki-shunsuke force-pushed the fix/fix-parse-filemode branch from 9d1b240 to 2cd798c Compare June 22, 2021 23:29
@github-actions
Copy link

This pull request is stale because it has been open 60 days with no activity.
Remove stale label or comment or this will be closed in 7 days.
If you don't want this pull request to be closed, please set the label pinned.

@github-actions github-actions bot added the stale label Aug 22, 2021
@mavogel mavogel added pinned and removed stale labels Aug 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

service secret/config file_mode interpreted as decimal instead of octal
3 participants