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

A method to get the value #4

Open
jrosell opened this issue Aug 2, 2024 · 2 comments
Open

A method to get the value #4

jrosell opened this issue Aug 2, 2024 · 2 comments

Comments

@jrosell
Copy link

jrosell commented Aug 2, 2024

I guess it could be helpful to have some function to be sure that we can get the cookie value securely.

When restarting the app sometimes I see the value of the string containing devOpifex/scilis and I did this:

errors <- ""    
cookie <- req$cookie[[cookie_errors]]
if (is.character(cookie) && cookie != "" && length(cookie) > 0 && !str_detect(cookie, "devOpifex/scilis")) {
  errors <- req$cookie[[cookie_errors]]    
  res$cookie(name = cookie_errors, value = "")
}

I imagine something like this:

errors <- ""    
if (scilis::is_secure(req, cookie_errors)) {
errors <- req$cookie[[cookie_errors]]    
res$cookie(name = cookie_errors, value = "")
}
@JohnCoene
Copy link
Contributor

Not sure why I never thought of that

@jrosell
Copy link
Author

jrosell commented Oct 16, 2024

And also make the change from devOpifex to ambiorix-web, I guess.

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

2 participants