Skip to content
This repository has been archived by the owner on Jun 18, 2020. It is now read-only.

Commit

Permalink
fix onesignal validation pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmed-aliraqi committed Apr 14, 2019
1 parent fc9e1ec commit c0ab9cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Models/Traits/HasApiAuthentication.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function canLoginWithApi()
*/
public function addOneSignalToken($token)
{
if ($token && preg_match("/[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}/", $token)) {
if ($token && preg_match("/^[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}$/", $token)) {
// Delete previous tokens.
ServiceToken::where('name', ServiceToken::ONESIGNAL)
->where(compact('token'))
Expand Down

0 comments on commit c0ab9cb

Please sign in to comment.