Version 4.3.6

This commit is contained in:
Neo committed 2025-12-19 05:49:12 -08:00
1 parent fe1acf984a
commit 1a0c7fd3c2
609 files changed
+14707 -5726

No files matched your search

+4 -3
View File
@@ -288,6 +288,7 @@ class _OAuthClient extends \IPS\Node\Model
public function formatFormValues( $values )
{
/* Normalise the settings */
$originalClientType = $values['oauth_client_type'];
if ( $values['oauth_client_type'] === 'invision' )
{
$values['oauth_client_type'] = 'confidential';
@@ -375,7 +376,7 @@ class _OAuthClient extends \IPS\Node\Model
unset( $values['oauth_client_name'] );
/* Redirect URIs */
if ( $values['oauth_client_type'] === 'public' or in_array( 'authorization_code', $values['oauth_grant_types'] ) or in_array( 'implicit', $values['oauth_grant_types'] ) )
if ( \in_array( $originalClientType, array( 'public', 'invision', 'wordpress' ) ) or \in_array( 'authorization_code', $values['oauth_grant_types'] ) or \in_array( 'implicit', $values['oauth_grant_types'] ) )
{
$values['oauth_redirect_uris'] = json_encode( array_map( function( $url ) { return (string) $url; }, $values['oauth_redirect_uris'] ) );
}
@@ -494,7 +495,7 @@ class _OAuthClient extends \IPS\Node\Model
'access_token' => $accessToken,
'access_token_expires' => $this->access_token_length ? ( time() + ( $this->access_token_length * 3600 ) ) : NULL,
'refresh_token' => NULL,
'refresh_token_expires' => $this->access_token_length ? ( time() + ( $this->access_token_length * 3600 ) ) : NULL,
'refresh_token_expires' => $this->refresh_token_length ? ( time() + ( $this->refresh_token_length * 86400 ) ) : NULL,
'scope' => $scopes ? json_encode( $scopes ) : NULL,
'authorization_code' => $authorizationCode,
'issued' => time()
@@ -510,7 +511,7 @@ class _OAuthClient extends \IPS\Node\Model
if ( $this->refresh_token_length )
{
$data['refresh_token_expires'] = time() + ( $this->access_token_length * 86400 );
$data['refresh_token_expires'] = time() + ( $this->refresh_token_length * 86400 );
}
else
{