mirror of
https://github.com/gchq/CyberChef
synced 2025-03-14 05:46:56 +00:00
Corrected error messages mismatches
This commit is contained in:
parent
a89c2bbc4f
commit
8e871637b5
3 changed files with 4 additions and 4 deletions
src/core/operations
tests/operations/tests
|
@ -79,7 +79,7 @@ class NTPTimestampToUNIXTimestamp extends Operation {
|
|||
|
||||
// Check whether the seconds value part do not exceeds the greatest seconds value
|
||||
if (unixTimestampSecondsPart > greatestSecondsValue) {
|
||||
return `Error: The NTP Timestamp seconds part '${unixTimestampSecondsPart}' exceeds the greatest authorized seconds value ${greatestSecondsValue} due to an incorrect provided UNIX timestamp`;
|
||||
return `Error: The NTP Timestamp seconds part '${unixTimestampSecondsPart}' exceeds the greatest authorized seconds value '${greatestSecondsValue}' due to an incorrect provided UNIX timestamp`;
|
||||
}
|
||||
|
||||
// Convert the UNIX timestamp seconds part value (seconds elapsed since 01 january
|
||||
|
|
|
@ -188,7 +188,7 @@ TestRegister.addTests([
|
|||
{
|
||||
name: "NTP Timestamp to UNIX Timestamp : NTP timestamp seconds part is greater than the greatest 32 bits value 4294967296",
|
||||
input: "4294967297.1842400034",
|
||||
expectedOutput: "Error: Timestamp seconds part should be 32 bits long. The seconds part '4294967297' of the provided NTP timestamp is greater than the greatest 32 bits value '4294967296'",
|
||||
expectedOutput: "Error: Timestamp seconds part should be 32 bits long. The seconds part '4294967297' of the provided NTP timestamp exceeds the maximum positive integer representable in 32 bits '4294967296'",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "NTP Timestamp to UNIX Timestamp",
|
||||
|
@ -199,7 +199,7 @@ TestRegister.addTests([
|
|||
{
|
||||
name: "NTP Timestamp to UNIX Timestamp : NTP timestamp seconds fractions part is greater than the greatest 32 bits value 4294967296",
|
||||
input: "3923215437.4294967297",
|
||||
expectedOutput: "Error: Timestamp fractions seconds part should be 32 bits long. The fractions seconds part '4294967297' of the provided NTP timestamp is greater than the greatest 32 bits value '4294967296'",
|
||||
expectedOutput: "Error: Timestamp fractions seconds part should be 32 bits long. The fractions seconds part '4294967297' of the provided NTP timestamp exceeds the maximum positive integer representable in 32 bits '4294967296'",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "NTP Timestamp to UNIX Timestamp",
|
||||
|
|
|
@ -166,7 +166,7 @@ TestRegister.addTests([
|
|||
{
|
||||
name: "UNIX Timestamp to NTP Timestamp : NTP timestamp seconds part is greater than the greatest authorized value 2085978496",
|
||||
input: "2085978497",
|
||||
expectedOutput: "Error: The UNIX Timestamp seconds part '2085978497' exceeds the greatest authorized seconds value '2085978496' due to an incorrect provided UNIX timestamp",
|
||||
expectedOutput: "Error: The NTP Timestamp seconds part '2085978497' exceeds the greatest authorized seconds value 2085978496 due to an incorrect provided UNIX timestamp",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "UNIX Timestamp to NTP Timestamp",
|
||||
|
|
Loading…
Add table
Reference in a new issue