User Tools

Site Tools


projects:supaloc_support

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
projects:supaloc_support [2019/07/11 08:58]
192.168.2.236
projects:supaloc_support [2019/07/18 09:29] (current)
192.168.2.126 [Servers used]
Line 5: Line 5:
 It uses email and SMS pathways. It uses email and SMS pathways.
  
-==== Code hacks ====+==== Custom code ====
 07/05/2019: on file /​include/​class.ticket.php. 07/05/2019: on file /​include/​class.ticket.php.
 <​code>​ <​code>​
Line 14: Line 14:
 11/07/2019: on file /​include/​class.ticket.php. 11/07/2019: on file /​include/​class.ticket.php.
 <​code>​ <​code>​
-/* from line 1052 */+/* from line 1563 */
 $alert = $this->​replaceVars($msg,​ array('​recipient'​ => '​Jessica McMurray - email copy'​));​ $alert = $this->​replaceVars($msg,​ array('​recipient'​ => '​Jessica McMurray - email copy'​));​
 $email->​sendAlert('​[email protected]',​ $alert['​subj'​],​ $alert['​body'​],​ null, $options); $email->​sendAlert('​[email protected]',​ $alert['​subj'​],​ $alert['​body'​],​ null, $options);
 +</​code>​
 +15/07/2019: on file /​include/​class.api.php.
 +<​code>​
 +    function requireApiKey() {
 +        # Validate the API key -- required to be sent via the X-API-Key
 +        # header
 +
 +        if(!($key=$this->​getApiKey()))
 +            return $this->​exerr(401,​ __('​Valid API key required'​));​
 +        elseif (!$key->​isActive() || $key->​getIPAddr()!='​127.0.0.1'​)
 +            return $this->​exerr(401,​ __('​API key not found/​active or source IP not authorized'​));​
 +
 +        return $key;
 +    }
 +
 +    function getApiKey() {
 +
 +        if (!$this->​apikey && isset($_SERVER['​HTTP_X_API_KEY'​]))
 +            $this->​apikey = API::​lookupByKey($_SERVER['​HTTP_X_API_KEY'​],​ '​127.0.0.1'​);​
 +
 +        return $this->​apikey;​
 +    }
 </​code>​ </​code>​
 ==== Servers used ==== ==== Servers used ====
-[[servers:192_168_6_5|Server ​Production Wheezy ​/ 192.168.6.5]]+[[servers:192_168_6_10|Server ​OsTicket ​/ 192.168.6.10]]
 === Log === === Log ===
 ^ Date ^ Action ^ Comment ^ ^ Date ^ Action ^ Comment ^
 |07/​05/​2019|Code hack|We allow some users to receive all emails generated by the app.| |07/​05/​2019|Code hack|We allow some users to receive all emails generated by the app.|
-|11/11/2019|Code hack|We allow some users to receive all emails generated by the app. Applying previous patch|+|11/07/2019|Code hack|We allow some users to receive all emails generated by the app. Applying previous patch
 +|15/​07/​2019|Code hack|Forcing REMOTE_ADDR in order to allow containers dynamic IP|
 | | | | | | | |
  
projects/supaloc_support.1562806693.txt.gz · Last modified: 2019/07/11 08:58 by 192.168.2.236