Skip to content

Commit

Permalink
fix(globals)!: disabled $_REQUEST super global function
Browse files Browse the repository at this point in the history
BREAKING CHANGE: If you used `http_request_vars()` before it will now panic until a proper implementation is found.

Refs: #331
  • Loading branch information
Xenira committed Oct 21, 2024
1 parent 0d9496b commit 2458733
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/zend/globals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,10 @@ impl ProcessGlobals {

/// Get the HTTP Request variables. Equivalent of $_REQUEST.
pub fn http_request_vars(&self) -> &ZendHashTable {
self.http_globals[TRACK_VARS_REQUEST as usize]
.array()
.expect("Type is not a ZendArray")
todo!("$_REQUEST super global was erroneously fetched from http_globals which resulted in an out-of-bounds access. A new implementation is needed.");
// self.http_globals[TRACK_VARS_REQUEST as usize]
// .array()
// .expect("Type is not a ZendArray")
}

/// Get the HTTP Environment variables. Equivalent of $_ENV.
Expand Down

0 comments on commit 2458733

Please sign in to comment.