mastercontroller 1.3.16 → 1.3.17

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/MasterRouter.js +6 -2
  2. package/package.json +1 -1
package/MasterRouter.js CHANGED
@@ -89,7 +89,9 @@ const ROUTER_CONFIG = {
89
89
  const sanitizedValue = sanitizeRouteParam(paramName, paramValue);
90
90
 
91
91
  requestParams[paramName] = sanitizedValue;
92
- routePathList[i] = sanitizedValue;
92
+ // FIX: Use requestItem (original value) not sanitizedValue for route matching
93
+ // The route pattern should match against the actual request path
94
+ routePathList[i] = requestItem;
93
95
  }
94
96
  }
95
97
  }
@@ -915,7 +917,9 @@ class MasterRouter {
915
917
  }
916
918
 
917
919
  const $that = this;
918
- const requestObject = Object.create(rr);
920
+ // FIX: Use direct reference instead of Object.create() to preserve request/response objects
921
+ // Object.create() puts properties on prototype, causing undefined access issues
922
+ const requestObject = rr;
919
923
 
920
924
  // CRITICAL FIX: Load scoped services into request-specific context
921
925
  // Pass requestObject so scoped services are stored per-request, not globally
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mastercontroller",
3
- "version": "1.3.16",
3
+ "version": "1.3.17",
4
4
  "description": "Fortune 500 ready Node.js MVC framework with enterprise security, monitoring, and horizontal scaling",
5
5
  "main": "MasterControl.js",
6
6
  "license": "MIT",