mirror of
https://github.com/Queercon/QC14-Badge-Webview.git
synced 2025-08-20 13:23:36 -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
|
// [DDDDDDDDDD] < -icon bit array 39...........0
|
||||||
// [EE] < -Checksum
|
// [EE] < -Checksum
|
||||||
// 0908[0000000000000000] < -End + Crypto
|
// 0908[0000000000000000] < -End + Crypto
|
||||||
|
//
|
||||||
|
// 0x0201040319DC190FFFD304AAAABBCCDDDDDDDDDDEE09080000000000000000
|
||||||
|
|
||||||
if (String.IsNullOrEmpty(advertData))
|
if (String.IsNullOrEmpty(advertData))
|
||||||
{
|
{
|
||||||
|
@ -144,9 +146,21 @@ namespace qcbadge.Controllers
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
String header = "0x0201040319DC190FFFD304";
|
||||||
|
String footer = "09080000000000000000";
|
||||||
|
|
||||||
|
if(advertData.StartsWith(header) && advertData.EndsWith(footer))
|
||||||
{
|
{
|
||||||
return StatusCode(200);
|
return StatusCode(200);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return StatusCode(400);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
public IActionResult Error()
|
public IActionResult Error()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue