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

trust argument of import() #432

Closed
lobin-xx opened this issue Jun 13, 2024 · 2 comments
Closed

trust argument of import() #432

lobin-xx opened this issue Jun 13, 2024 · 2 comments

Comments

@lobin-xx
Copy link

Hey!

Just to let you know I got such warning while using import (Windows 11; R.4.4.0; rio 1.1.1)

df <- rio::import(file.path(ROOT_DATA_DIR,'my_df.rds'))
Warning message:
The trust argument of import() should be explicit for serialization formats as of rio 1.0.3.
ℹ Missing trust will be set to FALSE by default for RDS in 2.0.0.
ℹ The deprecated feature was likely used in the rio package.
Please report the issue at https://github.com/gesistsa/rio/issues.
This warning is displayed once every 8 hours.
Call lifecycle::last_lifecycle_warnings() to see where this warning was generated.

Best!Lobin

@chainsawriot
Copy link
Collaborator

@lobin-xx That's a feature. See #406 . There is a security risk of importing serialization files, so we must ensure that you trust your RDS.

https://gesistsa.github.io/rio/news/index.html#rio-103

You can either say you trust your RDS, i.e. df <- rio::import(file.path(ROOT_DATA_DIR,'my_df.rds', 'my_df.rds'), trust = TRUE).

Or you can change the option.

options(rio.import.trust = TRUE) ## put this to .Rprofile, if you dare.
df <- rio::import(file.path(ROOT_DATA_DIR,'my_df.rds'))

@lobin-xx
Copy link
Author

Thanks a lot!

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