@xuda.io/drive_module 1.1.791 → 1.1.792

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +9 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -2666,11 +2666,20 @@ const get_drive_doc = async function (
2666
2666
 
2667
2667
  case "workspace": {
2668
2668
  const app_id_reference = await _common.get_project_app_id(app_id);
2669
+
2669
2670
  doc_ret = await db_module.get_app_couch_doc(
2670
2671
  app_id_reference,
2671
2672
  check_existing_file_ret.duplicates[0]._id
2672
2673
  );
2673
2674
 
2675
+ if (
2676
+ doc_ret?.data?.type === "file" &&
2677
+ !file_path.includes(app_id) &&
2678
+ !file_path.includes(app_id_master)
2679
+ ) {
2680
+ throw new Error("file_path unauthorized");
2681
+ }
2682
+
2674
2683
  break;
2675
2684
  }
2676
2685
  default:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/drive_module",
3
- "version": "1.1.791",
3
+ "version": "1.1.792",
4
4
  "description": "Xuda Drive Server Module",
5
5
  "main": "index.js",
6
6
  "dependencies": {