SWE-574-Group-4 / Community-Management-System

A social platform for users to form communities, share content, and interact.
http://54.171.199.115:5173/
4 stars 2 forks source link

Data too long error on Post Creation #116

Open GaitovRK opened 2 weeks ago

GaitovRK commented 2 weeks ago

Describe the bug A clear and concise description of what the bug is.

Steps to Reproduce Provide a step-by-step guide to reproduce the bug. This helps developers to identify and replicate the issue.

  1. Open create a post page
  2. In the description field add a long text like: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATYAAACjCAMAAAA3vsLfAAABXFBMVEVOzMf////p7PEzKfVP0cUtIvVgWvfw8/EyHfcfD/XCwPtBhN8jFvUyGvfy8v5P0MarqPpEl9kcCvX4+fvu8PTzVltLvctvavc9NPXe4PFIrNLGx/KHg/ju8fFJsNBQSvWhoPMX4V1NCjN2dmvpAfuJMRvT2W5A/euJbVfdGPvUAAPcVJf74+/WvrfqsRK3vWZZ3N869SZT3V1VDpaRNxclLwb3q6f7j5vH8WE1KuM5Hs7E7X+lGodZDkdv/Xoc9bubpV5nKT665ufJ4c/jS0/KZP7c2wZc5VexpY/dNx8jMyvz6XI65tvvdVKKySL2TQM52Nt6Bf/ORj/P/WkV5OMzW2PI+c+Q6XupQI+huK9udO8enP8FwdP3/YINZKeRjM+TDTbPfVZ+rRKagQbKJO8XB4NpKxJ/M5OGY1cMIvItvzK/up6z0OD7sx8zycnbvmp/wh4zq2+DtuL0MBGCOAAANB0lEQVR4nO2dDVfayBqA1WRIYgehQypQSIGWwsIAxesXVm1VoC0qKrBLa3W31t3t3c+7e3v//zl3ZhIgKYgLIknqPOd4zInBJk/nnZl3PuLMDIfD4XA4HA6Hw+FwOBwOh8PhcDgcji347MTuhx8TUdx/tH3fLrYf7Yui+9SJq/dSCHrtA6Ls00WXiRNXdxQZCPYCZGVrUbRbxQiIL7zMGYD2wf7XAHziHm/ijkJuWUahStJvF8lmFsnkLpR3bolT8Z2X/D+jSnXWXtpRREqcnHGHN/EtsSZn2zZLo6zHILmVLTfEqW+bRCis2W3MoEJuRnnhBm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pvih2z6Dsw3QwhBSJdcQAWBYP12XipYcLI2n7itS5Phjun1+tfslV8/KLSi0WjLP79+5TVfsTaf+DBmSHu7al7TadObGVyhjZS0jrRvVq0LdRyozSk5qe9hSJcmP139cnWT87Spn35zRk66yjq3Mri3378kzGHaSE76Sc9J4wroRw5NT5vvORIEL7g3M2gdnbO06TkpPXJAKi9uocSTgdKcps1ZOam4eIU0x2mbc2pO6nBt/xCuzX3a9ldXV59DAdQCCzbi8Jy0D/E+9nq9bAzJTmTBVdr2F19Yhzjsw0XafNt0SG1An3LamLV9Nr4crO05HfquDepUTpdUT9sff/5H/euxo7XNiAlBgBFbG1FGvdckfH7w4K8//2AjoQ7o7l6h7anXEd7MHZDPy8t/69bqqdgAavZrY38XTMDB+ry9ROWuNvW/y8sPWN2mFULZAWQcoM33iC3Pgoq9yOa67e/Py4+dHaQkTB8CZ3RBunUbqdc+/8/ZTQLBt/pWhrLNAFf123TE/e0n9+xlC7hPG/2b6KK9vJDdqM1ufE+4tjHg2saCaxsLrm0suLax4NrGgmsbC65tLLi2seDaxoJrGwuubSyotkR+tD8EqBFt8I5r2/YKMB4ZjaYsKIt3WtvMviwIow7MywKI2fuaRdvxbWMw8jA68N7xwkanNFJoxNKG3tx5a3Ql+/7iaMw478XPHA6Hw+FwOBwOxyGs2X0DbmRtZXPlCnFr5PzmdO/GNaywr5WZzZWVtRWikH1bY8fE6NrmJv1asfsuHcfmGrEzs7LGjFFPTBc1tUJKGzkgXz6u7Us2ackiobpGRRGHJGRZEVth30mg8tI2EFqgBp3uHRJz07oZDofD4XC+Zv4P6Nq0w/paT4sAAAAASUVORK5CYII=
  3. Press create a post

Expected behavior It either should give an error that the post is too long or the limit should be increased

Screenshots

image

Logs & Error Messages "Data too long for column 'content' at row 1"

Additional context Connected to #45