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

ox_inventory items conversion no longer functions as intended #652

Open
FrazzIe opened this issue Jan 4, 2025 · 2 comments
Open

ox_inventory items conversion no longer functions as intended #652

FrazzIe opened this issue Jan 4, 2025 · 2 comments
Assignees
Labels
bug Something isn't working need repro This bug report needs confirmation

Comments

@FrazzIe
Copy link

FrazzIe commented Jan 4, 2025

Summary

The qbx_core item converter for ox_inventory no longer functions as intended

Reproduction

  1. Server build 12180 or greater
  2. Add new item to "qbx_core/shared/items.lua"
  3. Start the server
  4. Watch as the file is not written to "ox_inventory/data"

Expected behavior

I expected the data/items.lua in ox_inventory to be overwritten with the converted output from qbx_core

Actual behavior

Due to a recent security change here certain files can no longer be overwritten by an external script without sufficient permission or matching authors from a brief look.

The file fails to be overwritten the return value from SaveResourceFIle is false (with 0 context on why it failed).

Additional context

Due to a recent security change here certain files can no longer be overwritten by an external script without sufficient permission or matching authors from a brief look.

add_filesystem_permission - a new command to grant read/write permissions to a resource for a resource from what I understand. There is no documentation or mention of this anywhere. I tried experimenting myself with this and wasn't able to get anything to happen. added to server.cfg as add_filesystem_permission qbx_core write ox_inventory.

".lua", ".dll", ".ts", ".js", ".mjs", ".cjs", ".cs" - These file types have been marked readonly and can no longer be changed without write permissions

Current Version

1.22.3

Custom Resources

n/a

@FrazzIe FrazzIe added bug Something isn't working need repro This bug report needs confirmation labels Jan 4, 2025
@qbox-duck qbox-duck bot added this to Issues Jan 4, 2025
@github-project-automation github-project-automation bot moved this to Todo in Issues Jan 4, 2025
@Manason
Copy link
Contributor

Manason commented Jan 4, 2025

This should be addressed by moving the functionality out of lua and onto a webpage I think. Alternatively, we could keep it in lua, but save the output to a file to be copied and pasted by a user into the ox_inventory config. I think the webpage solution will be more convenient for users though.

@FrazzIe
Copy link
Author

FrazzIe commented Jan 4, 2025

https://github.com/citizenfx/fivem-docs/blob/296a784082c3dae68c5c24408dece46b5bc9d0c9/content/docs/developers/sandbox.md is the documentation going over the changes, looks like you'd need matching authors as well as forcefully granting right permissions to keep the same functionality.

Probably wise to save in qbx_core for manual copy for now and expand on it further.

@Ehbw Ehbw self-assigned this Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working need repro This bug report needs confirmation
Projects
Status: Todo
Development

No branches or pull requests

3 participants