Compare commits
2 Commits
5c69237169
...
8889eb3ded
Author | SHA1 | Date |
---|---|---|
osaajani | 8889eb3ded | |
osaajani | a226139630 |
|
@ -44,6 +44,12 @@ interface AdapterInterface
|
||||||
*/
|
*/
|
||||||
public static function meta_hidden(): bool;
|
public static function meta_hidden(): bool;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Should this adapter data be hidden after creation
|
||||||
|
* this help to prevent API credentials to other service leak if an attacker gain access to RaspiSMS through user credentials.
|
||||||
|
*/
|
||||||
|
public static function meta_hide_data(): bool;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Name of the adapter.
|
* Name of the adapter.
|
||||||
* It should probably be the name of the service it adapt (e.g : Gammu SMSD, OVH SMS, SIM800L, etc.).
|
* It should probably be the name of the service it adapt (e.g : Gammu SMSD, OVH SMS, SIM800L, etc.).
|
||||||
|
|
|
@ -66,6 +66,15 @@ namespace adapters;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Should this adapter data be hidden after creation
|
||||||
|
* this help to prevent API credentials to other service leak if an attacker gain access to RaspiSMS through user credentials.
|
||||||
|
*/
|
||||||
|
public static function meta_hide_data(): bool
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Name of the adapter.
|
* Name of the adapter.
|
||||||
* It should probably be the name of the service it adapt (e.g : Gammu SMSD, OVH SMS, SIM800L, etc.).
|
* It should probably be the name of the service it adapt (e.g : Gammu SMSD, OVH SMS, SIM800L, etc.).
|
||||||
|
|
|
@ -61,6 +61,15 @@ namespace adapters;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Should this adapter data be hidden after creation
|
||||||
|
* this help to prevent API credentials to other service leak if an attacker gain access to RaspiSMS through user credentials.
|
||||||
|
*/
|
||||||
|
public static function meta_hide_data(): bool
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Name of the adapter.
|
* Name of the adapter.
|
||||||
* It should probably be the name of the service it adapt (e.g : Gammu SMSD, OVH SMS, SIM800L, etc.).
|
* It should probably be the name of the service it adapt (e.g : Gammu SMSD, OVH SMS, SIM800L, etc.).
|
||||||
|
|
|
@ -119,6 +119,15 @@ class KannelAdapter implements AdapterInterface
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Should this adapter data be hidden after creation
|
||||||
|
* this help to prevent API credentials to other service leak if an attacker gain access to RaspiSMS through user credentials.
|
||||||
|
*/
|
||||||
|
public static function meta_hide_data(): bool
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Name of the adapter.
|
* Name of the adapter.
|
||||||
|
|
|
@ -97,6 +97,15 @@ class OctopushShortcodeAdapter implements AdapterInterface
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Should this adapter data be hidden after creation
|
||||||
|
* this help to prevent API credentials to other service leak if an attacker gain access to RaspiSMS through user credentials.
|
||||||
|
*/
|
||||||
|
public static function meta_hide_data(): bool
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Name of the adapter.
|
* Name of the adapter.
|
||||||
* It should probably be the name of the service it adapt (e.g : Gammu SMSD, OVH SMS, SIM800L, etc.).
|
* It should probably be the name of the service it adapt (e.g : Gammu SMSD, OVH SMS, SIM800L, etc.).
|
||||||
|
|
|
@ -96,6 +96,16 @@ class OctopushVirtualNumberAdapter implements AdapterInterface
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Should this adapter data be hidden after creation
|
||||||
|
* this help to prevent API credentials to other service leak if an attacker gain access to RaspiSMS through user credentials.
|
||||||
|
*/
|
||||||
|
public static function meta_hide_data(): bool
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Name of the adapter.
|
* Name of the adapter.
|
||||||
* It should probably be the name of the service it adapt (e.g : Gammu SMSD, OVH SMS, SIM800L, etc.).
|
* It should probably be the name of the service it adapt (e.g : Gammu SMSD, OVH SMS, SIM800L, etc.).
|
||||||
|
|
|
@ -72,6 +72,15 @@ namespace adapters;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Should this adapter data be hidden after creation
|
||||||
|
* this help to prevent API credentials to other service leak if an attacker gain access to RaspiSMS through user credentials.
|
||||||
|
*/
|
||||||
|
public static function meta_hide_data(): bool
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Name of the adapter.
|
* Name of the adapter.
|
||||||
* It should probably be the name of the service it adapt (e.g : Gammu SMSD, OVH SMS, SIM800L, etc.).
|
* It should probably be the name of the service it adapt (e.g : Gammu SMSD, OVH SMS, SIM800L, etc.).
|
||||||
|
|
|
@ -84,6 +84,15 @@ namespace adapters;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Should this adapter data be hidden after creation
|
||||||
|
* this help to prevent API credentials to other service leak if an attacker gain access to RaspiSMS through user credentials.
|
||||||
|
*/
|
||||||
|
public static function meta_hide_data(): bool
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Name of the adapter.
|
* Name of the adapter.
|
||||||
* It should probably be the name of the service it adapt (e.g : Gammu SMSD, OVH SMS, SIM800L, etc.).
|
* It should probably be the name of the service it adapt (e.g : Gammu SMSD, OVH SMS, SIM800L, etc.).
|
||||||
|
|
|
@ -71,6 +71,15 @@ namespace adapters;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Should this adapter data be hidden after creation
|
||||||
|
* this help to prevent API credentials to other service leak if an attacker gain access to RaspiSMS through user credentials.
|
||||||
|
*/
|
||||||
|
public static function meta_hide_data(): bool
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Name of the adapter.
|
* Name of the adapter.
|
||||||
* It should probably be the name of the service it adapt (e.g : Gammu SMSD, OVH SMS, SIM800L, etc.).
|
* It should probably be the name of the service it adapt (e.g : Gammu SMSD, OVH SMS, SIM800L, etc.).
|
||||||
|
|
|
@ -83,6 +83,15 @@ class TwilioVirtualNumberAdapter implements AdapterInterface
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Should this adapter data be hidden after creation
|
||||||
|
* this help to prevent API credentials to other service leak if an attacker gain access to RaspiSMS through user credentials.
|
||||||
|
*/
|
||||||
|
public static function meta_hide_data(): bool
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Name of the adapter.
|
* Name of the adapter.
|
||||||
* It should probably be the name of the service it adapt (e.g : Gammu SMSD, OVH SMS, SIM800L, etc.).
|
* It should probably be the name of the service it adapt (e.g : Gammu SMSD, OVH SMS, SIM800L, etc.).
|
||||||
|
|
|
@ -176,6 +176,19 @@ namespace controllers\publics;
|
||||||
$entries[$key]['contacts'] = $this->internal_group->get_contacts($entry['id']);
|
$entries[$key]['contacts'] = $this->internal_group->get_contacts($entry['id']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Special case for phone as we might need to remove adapter_data for security reason
|
||||||
|
elseif ('phone' == $entry_type)
|
||||||
|
{
|
||||||
|
foreach ($entries as $key => $entry)
|
||||||
|
{
|
||||||
|
if (!$entry['adapter']::meta_hide_data())
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
unset($entries[$key]['adapter_data']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$return = self::DEFAULT_RETURN;
|
$return = self::DEFAULT_RETURN;
|
||||||
$return['response'] = $entries;
|
$return['response'] = $entries;
|
||||||
|
|
Loading…
Reference in New Issue