mirror of
https://github.com/Queercon/QC14-Badge-Webview.git
synced 2025-08-14 18:47:38 -07:00
check header and footer
This commit is contained in:
parent
60ecfbabcc
commit
26ae279c70
1 changed files with 15 additions and 1 deletions
|
@ -136,6 +136,8 @@ namespace qcbadge.Controllers
|
|||
// [DDDDDDDDDD] < -icon bit array 39...........0
|
||||
// [EE] < -Checksum
|
||||
// 0908[0000000000000000] < -End + Crypto
|
||||
//
|
||||
// 0x0201040319DC190FFFD304AAAABBCCDDDDDDDDDDEE09080000000000000000
|
||||
|
||||
if (String.IsNullOrEmpty(advertData))
|
||||
{
|
||||
|
@ -145,7 +147,19 @@ namespace qcbadge.Controllers
|
|||
}
|
||||
else
|
||||
{
|
||||
return StatusCode(200);
|
||||
String header = "0x0201040319DC190FFFD304";
|
||||
String footer = "09080000000000000000";
|
||||
|
||||
if(advertData.StartsWith(header) && advertData.EndsWith(footer))
|
||||
{
|
||||
return StatusCode(200);
|
||||
}
|
||||
else
|
||||
{
|
||||
return StatusCode(400);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue