Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Billing migration - Html #1222

Open
michalcharvat opened this issue Jan 29, 2025 · 0 comments
Open

Billing migration - Html #1222

michalcharvat opened this issue Jan 29, 2025 · 0 comments

Comments

@michalcharvat
Copy link
Contributor

michalcharvat commented Jan 29, 2025

Billing migration is pain in the neck because Html custom field does not support import the old value if there is detected XSS in the old value.

if(!empty($value) && StringUtil::detectXSS($value)) {
    $model->setValidationError("customFields." . $field->databaseName, ErrorCode::INVALID_INPUT, "You're not allowed to put scripts in customFields." . $field->databaseName);				
    return false;
}

it would be nice to allow import these old values with some kind of exception. I agree it is a security issue but with thousands of documents with html in it you are not able to migrate old billing module to finance.

Other issues I have found during migration:

  • products without default language will stop the migration process - solved by
insert into bs_product_languages (product_id, language_id, name) select id, 1, 'Unknown' from bs_products where id NOT IN (select product_id from bs_product_languages where language_id = 1);
  • missing custom fields - for example Notes - solved by recreating them
  • billing does not count with the credit notes but if you have credit note category you have to migrate it manually
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant